HOME | DD

undefinedreference — Greymouse Intruders

Published: 2022-04-25 11:21:37 +0000 UTC; Views: 192; Favourites: 0; Downloads: 0
Redirect to original
Description Want to learn hex RGB? But without too many boring details? Just keep the following basic truths in mind:

1. hex is hexadecimal: rather than 10 digits (0-9) it has 16 (0-f)

Boring details (skippable):
- the letters represent values beyond 9: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f
- therefore these letters represent: a = 10, b = 11, c = 12, d = 13, e = 14, f = 15
- the letters are case-insensitive, therefore f is the same as F; I generally dislike UPPERCASE myself
- kemputors like hex, because 16 is a power of 2: 2, 4, 8, 16, 32, ..
- also, kemputors start counting at 0 rather than 1

2. Letters represent higher values than numbers

3. RGB (RedGreenBlue) assigns two hex digits to each color; allegorically: RRGGBB

These can be unraveled to 'RR GG BB' for clarity.

Also: as with decimal numbers, it is the leftmost digit that carries the most weight (the 5 in 53 matters more than the 3).
This allows the RGB value to be simplified RR GG BB to R G B, taking the leftmost digit for each color.

Now let's look at the colors displayed in this image:

(Details (skippable): fieldwidth = 120 (8 fields): increment: hex 1c71c7, dec 1864135; excess field space removed)

(the dots below are an attempt to force dA to show a somewhat decent table; most likely a failure in advance)

Code.... Unraveled.. Simplified
RRGGBB - RR GG BB .. R G B
1c71c7 ..... 1c 71 c7 .. 1 7 c - not much red, some green, mostly blue - water blue
38e38e .... 38 e3 8e .. 3 e 8 - not much red, mostly green, some blue - pale bluish green
555555 .... 55 55 55 .. 5 5 5 - all the same = gray
71c71c .... 71 c7 1c .. 7 c 1 - some red, mostly green, not much blue - bright green
8e38e3 .... 8e 38 e3 .. 8 3 e - some red, mot much green, mostly blue - lavender violet
aaaaaa .... aa aa aa .. a a a - all the same = gray
c71c71 ..... c7 1c 71 .. c 1 7 - mostly red, not much green, some blue - purplish red
e38e38 .... e3 8e 38 .. e 8 3 - mostly red, some green, not much blue - orange

I read the actual colors from the image. I am not so addicted to RGB that I could predict the precise color from its value (I have never given it this much attention, to be honest). However, the observations 'not much.. some.. mostly' do give firm hints in the proper direction.

The only other thing there is to it, is than "overall" values closer to 000000 (black) are darker than the ones closer to ffffff (white). But since RGB values are often a disparate mix, this isn't always that easy to spot at a glance. It is with 555555 and aaaaaa, for example: the latter has to be the lighter one, which it is indeed confirmed by the image.

So how is a traditional decimal RGB value like (123, 234, 96) any easier to to deal with than 7bea60, unraveled to 7b ea 60?
Related content
Comments: 0