"함수 rgb2hexcolor()"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
 
5번째 줄: 5번째 줄:
==PHP==
==PHP==
[[category: PHP]]
[[category: PHP]]
<source lang='PHP'>
<syntaxhighlight lang='PHP'>
function rgb2hexcolor($rgb) {
function rgb2hexcolor($rgb) {
return '#'.dechex($rgb[0]).dechex($rgb[1]).dechex($rgb[2]);
return '#'.dechex($rgb[0]).dechex($rgb[1]).dechex($rgb[2]);
}
}
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==
* [[함수 hexcolor2rgb()]]
* [[함수 hexcolor2rgb()]]
* [[함수 dechex()]]
* [[함수 dechex()]]

2020년 11월 2일 (월) 02:36 기준 최신판

rgb2hexcolor, rgb 2 hexcolor

1 PHP[ | ]

function rgb2hexcolor($rgb) {
	return '#'.dechex($rgb[0]).dechex($rgb[1]).dechex($rgb[2]);
}

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}