+ 1
any formula to rgb color code?
2 Answers
+ 3
RGB constructs all the colors from the combination of the Red, Green and Blue colors.
The red, green and blue use 8 bits each, which have integer values from 0 to 255. This makes 256*256*256=16777216 possible colors.
0 is off, 255 in on.
RGB code has 24 bits format (bits 0..23):
RGB = (R*65536)+(G*256)+B , (when R is RED, G is GREEN and B is BLUE)
For example:
Gray RGB code = 128*65536+128*256+128 = #808080
Yellow RGB code = 255*65536+255*256+0 = #FFFF00
0
( red, green, blue)