True Color Picker
True Color Picker
{ "changedPosition": 0, "bits": [ 1, 0, 0, 0, 0, 1, 0, 0 ] }
27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 |
---|---|---|---|---|---|---|---|
{ "len": 3, "changedPosition": 0, "_digits": [ 0, 8, 4 ], "digits": [ 8, 4 ] }
161 | 160 |
---|---|
8
|
4
|
{ "changedPosition": 0, "bits": [ 0, 1, 0, 1, 1, 1, 1, 0 ] }
27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 |
---|---|---|---|---|---|---|---|
{ "len": 2, "changedPosition": 0, "_digits": [ 5, 14 ], "digits": [ 5, 14 ] }
161 | 160 |
---|---|
5
|
E
|
{ "changedPosition": 0, "bits": [ 1, 1, 0, 0, 0, 0, 1, 0 ] }
27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 |
---|---|---|---|---|---|---|---|
{ "len": 3, "changedPosition": 0, "_digits": [ 0, 12, 2 ], "digits": [ 12, 2 ] }
161 | 160 |
---|---|
C
|
2
|
How Many Bits per Pixel?
24 bits can be used to represent True color.
Typically 8 bits each of Red, Green, and Blue (8 bits per channel) which represents a single pixel. (we are ignoring the alpha channel here)
Here we are using the 6-digit version of the RGB hexadecimal notations from W3C.
You can read the documentation from MDN as well.
Each channel (8-bit), 00-FF
can be notated in base-10 numbers between
Is True Color Sufficient?
So that’s about how we store and read the data for the color.
We used 24 bits, “True Color” here.
But this is not the end of the story and how we actually interpret and render colors is a lot more complex than that.
The color you see here is via sRGB which has been the most popular way on the web.
If you are keen on learning more about the subject, there are many resources to go down the rabbit hole including: