There are 256 shades of red, green and blue for a total of 16,777,216 color variations that can be displayed on a pixel; that number is also equal to 256 cubed or 2 to the power of 24.
There are other color depths such as Deep Color, using 30, 36 or 48-bit values for pixel. There are reduced depths such as 18, 16, 15 and 8 bit color.
For this page, we're using the standard 00-ff range used for 8-bit color channel values.
255 is factored as 3 x 85, 5 x 51, 15 x 17, and of course 1 x 255.
Use the factors of 255 to get shades that are evenly spaced. Using a spacing of 255 results in just the values of 00 and ff, just two values per color channel.
Using a spacing of 1 results in all 256 color channel values from 00 to ff.
So let's use the other values for spacing 8-bit RGB color channels. If you use a spacing of 81, you get 00, 55, aa and ff for a total of 4 color channel values.
Using a spacing of 51 results in 00, 33, 66, 99, cc and ff for a total of 6 color channel values.
Using a spacing of 17 results in this neat pattern: 00, 11, 22, 33, 44, 55, 66, 77, 88, 99, aa, bb, cc, dd, ee and ff for a total of 16 color channel values.
Using a spacing of 15 results in 00, 0f, 1e, 2d, 3c, 4b, 5a, 69, 78, 87, 96, a5, b4, c3, d2, e1, f0 and ff for a total of 18 color channel values.
Using a spacing of 5 results in 52 color channel values 00, 05, 0a, 0f, 14, 19,...fa, ff.
Using a spacing of 3 results in 86 color channel values 00, 03, 06, 09, 0c, 0f, 12,...fc, ff.
Note that you can use either 7f or 80 hex for a value since on a linear scale it equates to 7f.8 or 7f and a half.
Many of the values are rounded to the next hex digit where necessary.
23 colors = 00 ff
33 colors = 00 7f/80 ff
43 colors = 00 55 aa ff
53 colors = 00 40 7f/80 bf ff
63 colors = 00 33 66 99 cc ff
73 colors = 00 2a/2b 55 7f/80 aa d4/d5 ff
83 colors = 00 24 49 6d 92 b6 db ff
93 colors = 00 20 40 60 7f/80 9f bf df ff
103 colors = 00 1c 39 55 71 8e zz c6 e2 ff
113 colors = 00 19/1a 33 4c/4d 66 7f/80 99 b2/b3 cc e5/e6 ff
133 colors = 00 15 2a/2b 40 55 6a 7f/80 95 aa bf d4/d5 ea 44
163 colors = 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff
173 colors = 00 10 20 30 40 50 60 70 7f/80 8f 9f af bf cf df ef ff
183 colors = 00 0f 1e 2d 3c 4b 5a 69 78 87 96 a5 b4 c3 d2 e1 f0 ff
523 colors = 00 05 0a 0f 14 19 1e 23 28 2d 32 37 3a 41 46 4b 50 55 .... f0 f5 fa ff
863 colors = 00 03 06 09 0c 0f 12 15 18 1b 1e 21 24 27 2a 2d 30 33 .... f6 f9 fc ff
2563 colors = 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 .... fc fd fe ff
© 1995-2023. davesfunstuff.com. All Rights Reserved. Reproduction of any part of this website without expressed written consent is prohibited.