4 ms·
It's quite simple actually. If you have 8 bits per color channel, you can have 256 values per channel (or 16777216 in total if you look at it as a 24 bit value)
by st_goliath 5y ago
It's quite simple actually. If you have 8 bits per color channel, you can have 256 values per channel (or 16777216 in total if you look at it as a 24 bit value).
A rectangle of 256*256 pixels can display all possible combinations for two color channels, with the third one held constant. If you step through every possible value of the third channel, you end up with 256 of those pictures, which can be arranged neatly in a 16*16 grid (16*16 = 256).
Because each image has 256*256 pixels, and we have 16*16 of them, we end up with a 4096*4096 pixel image (because 16*256 = 4096), which now holds every possible combination of the 3 color channels.
Because this systematic approach creates neatly ascending rows of color values, the resulting image compresses quite well.
- jonplackett 5y agoVisualising it as a cube of colour helps me think about it. The 3 colours are 100% on one surface and 0% on the opposite. The cube being 256x256x256 pixels in size. Then in that image you’re showing slices of that cube.
- jedberg 5y agoWhoa, that's a really good way to visualize it. I'd love to see that rendered somehow.
- jonplackett 5y agohttps://en.m.wikipedia.org/wiki/RGB_color_space https://en.m.wikipedia.org/wiki/RGB_color_space Turns out, it’s also the way everyone else likes to visualise colours. That’s why it’s called a colour space I guess.
- mmaunder 5y agoI think you missed my attempt at humor - as did my downvoters. Digital color storage approximates the real world, which has an infinite number of colors for a given portion of the EM spectrum. So "All" suggests "we got 'em all!" as opposed to 2^24.