RGB Color Codes Chart ๐จ (rapidtables.com
RGB Color Codes Chart ๐จ
RGB Color Codes Chart RGB color picker | RGB color codes chart | RGB color space | RGB color format and calculation | RGB color table RGB color picker RGB color codes chart Hover with cursor on color to get the hex and decimal color codes below: RGB color
www.rapidtables.com
ํฌํ ์ต์ด๋ ๊ทธ๋ฆผํด, ์ฌ์ง ํธ์งํด ๋ฑ์ ์ต์ํ ์ฌ๋๋ค์ ์ ์๊ฒ ์ง๋ง
Decimal Code R,G,B ๊ฐ๊ฐ์ ๊ฐ์ ์กฐ์ ํ๋ฉด ์กฐ์ ํ ๋๋ง๋ค, ๋ค๋ฅธ ์ถ์ถ์์ ๋ณผ ์ ์๋ค.
๋นจ๊ฐ์ 0~255 ๊ฒฝ์ฐ, ๊ทธ๋ฆฐ์ ์ ๋ 0~255 ๊ฒฝ์ฐ, ํ๋์ ์ ๋ 0~255 ๊ฒฝ์ฐ๋ฅผ ๋ค๋ฅด๊ฒ ์ค์ ํ ์ ์์ผ๋ฏ๋ก
์ด 255 * 255 * 255 ๊ฐ์ง์ ์์ ๋ณผ ์ ์๋ ๊ฒ์ด๋ค.
R,G,B ๋ชจ๋ char ํ(8๋นํธ ์ ์ํ ๋ฐ์ดํฐํ์ )์ ์ฌ์ฉํ๋ค.
2^8์ ํฌ๊ธฐ๋ฅผ ๊ฐ์ง ๋ฐ์ดํฐํ์ผ๋ก -128~127๊น์ง์ ์ซ์๋ฅผ ๋ํ๋ผ ์ ์๋๋ฐ,
๋ค๋ง, char, signed char, unsigned char๋ก ์ด 3๊ฐ์ง์ Variation์ด ์๋ค.
โ
signed ์ unsigned๋ ์์๋ถํฐ 2^8์น ํฌ๊ธฐ์ ์ซ์๋ฅผ ๋ํ๋ด๋, ์๋๋ฉด 0๋ถํฐ 2^8์น ํฌ๊ธฐ์ ์ซ์๋ฅผ
๋ํ๋ด๋์ ์ฐจ์ด๋ก, โ
signed = -128 ~ 127 (์์ํ์ ๊ฐ๋ฅ)
unsigned = 0 ~ 255 (์์๋ง ํ์ ๊ฐ๋ฅ)์ด๋ฏ๋ก R,G,B ๋ ๋ชจ๋ unsigned char์ด๋ผ๋ ๊ฒ์ ์ ์ ์๋ค.
๊ทธ๋ ๋ค๋ฉด Vec{0.0f, 0.0f, 1.0f, 1.0f}๊ณผ ๊ฐ์ด ๋ผ๋ 0~1๋ก ๋ฐ์ง๋ ์ซ์ ์ฒด๊ณ๋ก
์์๋๋ก R,G,B, Alpha(ํฌ๋ช ๋)์ผ ๋, salmon์ ๋ณด๊ณ ์ถ๋ค๋ฉด?
salmon | #FA8072 | (250,128,114) |
R,G,B ๊ฐ๊ฐ์ด 0~1์ธ ๊ฒ์ 255๋ก ๋๋ ๊ฐ์ผ๋ก ๋ณํํด์ฃผ์ด์ผ ํ๋ค.
Vec{0.0f, 0.0f, 1.0f, 1.0f}์๋ ๊ฒ์
Vec4{250.0f / 255.0f, 128.0f / 255.0f, 114.0f / 255.0f, 1.0f}๋ก ๋ฐ๊พธ๋ฉด
R,G,B ๊ฐ๊ฐ 0~1 ์ฌ์ด์ ๊ฐ์ผ๋ก ๊ฐ๊ฐ ์ฝํ๊ฒ ๋๋ฉด์ ์ ์์ ์ผ๋ก salmon์ ์๊ฐ์ ๋ณผ ์ ์๊ฒ ๋๋ค.