B = value & 0x1f
G = (value >> 5) & 0x3f
R = (value >> 11) & 0x1f
Momerath
Nearly a Senior Poster
3,384 posts since Aug 2010
Reputation Points: 1,232
Solved Threads: 558
R is the amount of Red in the color. It ranges from 0 to 31.
G is the amount of Green in the color. It ranges from 0 to 63.
B is the amount of Blue in the color. It ranges from 0 to 31.
(0,0,0) is black, (31, 63, 31) is white.
Momerath
Nearly a Senior Poster
3,384 posts since Aug 2010
Reputation Points: 1,232
Solved Threads: 558
so for example if i wanted the reddest thing would i do:
You'd need to define what you mean by 'reddest'. For example, let's say we have to RGB colors with the values (31,1,0) and (30,0,0). Which is 'redder'? The first has a higher red value, but has a tiny amount of green. The second doesn't have the full red value, but has no other colors in it.
Momerath
Nearly a Senior Poster
3,384 posts since Aug 2010
Reputation Points: 1,232
Solved Threads: 558