Looking for RGB human-readable definitions

with FastLED one had the nice feature that returned colors like:

       Olive=0x808000,
        OliveDrab=0x6B8E23,
        Orange=0xFFA500,
        OrangeRed=0xFF4500,
        Orchid=0xDA70D6,
        PaleGoldenrod=0xEEE8AA,
        PaleGreen=0x98FB98,
        PaleTurquoise=0xAFEEEE,
        PaleVioletRed=0xDB7093,

I can't use FastLED no more, due to bad STM32 support - but it would be nice to find definitions that return colors in the typical three-byte format like (0,23,65)

I am sure somebody has a good set of definitions I could use..

But you can still use the color definitions from pixeltypes.h. Cut and Paste

I think it's the same thing except hexadecimal and without a comma...

So for example 0x6B8E23 is...
6B hex = 107 decimal
8E hex = 139 decimal
23 hex = 35 decimal
= (107,139,35)

I used the Windows calculator in "programmer mode" but of course you can also do the "conversion" in software... You can mask & bit-shift to get one byte at a time.

Once you have the RGB byte values/variables they are actually in binary and it doesn't matter if your program uses hex or decimal as the programming/input/output format.

@blh64
I know guess I can use it with slight formatting like:
#define OrangeRed (0xFF, 0x45, 0x00)
or do you have an even simpler method?

const byte INDIANRED_RGB[3] = {205, 92, 92};
const byte LIGHTCORAL_RGB[3] = {240, 128, 128};
const byte SALMON_RGB[3] = {250, 128, 114};
const byte DARKSALMON_RGB[3] = {233, 150, 122};
const byte LIGHTSALMON_RGB[3] = {255, 160, 122};
const byte CRIMSON_RGB[3] = {220, 20, 60};
const byte RED_RGB[3] = {255, 0, 0};
const byte FIREBRICK_RGB[3] = {178, 34, 34};
const byte DARKRED_RGB[3] = {139, 0, 0};

const byte PINK_RGB[3] = {255, 192, 203};
const byte LIGHTPINK_RGB[3] = {255, 182, 193};
const byte HOTPINK_RGB[3] = {255, 105, 180};
const byte DEEPPINK_RGB[3] = {255, 20, 147};
const byte MEDIUMVIOLETRED_RGB[3] = {199, 21, 133};
const byte PALEVIOLETRED_RGB[3] = {219, 112, 147};
const byte ORANGE HTML COLOR NAMES
const byte LIGHTSALMON_RGB[3] = {255, 160, 122};
const byte CORAL_RGB[3] = {255, 127, 80};
const byte TOMATO_RGB[3] = {255, 99, 71};
const byte ORANGERED_RGB[3] = {255, 69, 0};
const byte DARKORANGE_RGB[3] = {255, 140, 0};
const byte ORANGE_RGB[3] = {255, 165, 0};

const byte GOLD_RGB[3] = {255, 215, 0};
const byte YELLOW_RGB[3] = {255, 255, 0};
const byte LIGHTYELLOW_RGB[3] = {255, 255, 224};
const byte LEMONCHIFFON_RGB[3] = {255, 250, 205};
const byte LIGHTGOLDENRODYELLOW_RGB[3] = {250, 250, 210};
const byte PAPAYAWHIP_RGB[3] = {255, 239, 213};
const byte MOCCASIN_RGB[3] = {255, 228, 181};
const byte PEACHPUFF_RGB[3] = {255, 218, 185};
const byte PALEGOLDENROD_RGB[3] = {238, 232, 170};
const byte KHAKI_RGB[3] = {240, 230, 140};
const byte DARKKHAKI_RGB[3] = {189, 183, 107};

const byte LAVENDER_RGB[3] = {230, 230, 250};
const byte THISTLE_RGB[3] = {216, 191, 216};
const byte PLUM_RGB[3] = {221, 160, 221};
const byte VIOLET_RGB[3] = {238, 130, 238};
const byte ORCHID_RGB[3] = {218, 112, 214};
const byte FUCHSIA_RGB[3] = {255, 0, 255};
const byte MAGENTA_RGB[3] = {255, 0, 255};
const byte MEDIUMORCHID_RGB[3] = {186, 85, 211};
const byte MEDIUMPURPLE_RGB[3] = {147, 112, 219};
const byte REBECCAPURPLE_RGB[3] = {102, 51, 153};
const byte BLUEVIOLET_RGB[3] = {138, 43, 226};
const byte DARKVIOLET_RGB[3] = {148, 0, 211};
const byte DARKORCHID_RGB[3] = {153, 50, 204};
const byte DARKMAGENTA_RGB[3] = {139, 0, 139};
const byte PURPLE_RGB[3] = {128, 0, 128};
const byte INDIGO_RGB[3] = {75, 0, 130};
const byte SLATEBLUE_RGB[3] = {106, 90, 205};
const byte DARKSLATEBLUE_RGB[3] = {72, 61, 139};
const byte MEDIUMSLATEBLUE_RGB[3] = {123, 104, 238};

const byte GREENYELLOW_RGB[3] = {173, 255, 47};
const byte CHARTREUSE_RGB[3] = {127, 255, 0};
const byte LAWNGREEN_RGB[3] = {124, 252, 0};
const byte LIME_RGB[3] = {0, 255, 0};
const byte LIMEGREEN_RGB[3] = {50, 205, 50};
const byte PALEGREEN_RGB[3] = {152, 251, 152};
const byte LIGHTGREEN_RGB[3] = {144, 238, 144};
const byte MEDIUMSPRINGGREEN_RGB[3] = {0, 250, 154};
const byte SPRINGGREEN_RGB[3] = {0, 255, 127};
const byte MEDIUMSEAGREEN_RGB[3] = {60, 179, 113};
const byte SEAGREEN_RGB[3] = {46, 139, 87};
const byte FORESTGREEN_RGB[3] = {34, 139, 34};
const byte GREEN_RGB[3] = {0, 128, 0};
const byte DARKGREEN_RGB[3] = {0, 100, 0};
const byte YELLOWGREEN_RGB[3] = {154, 205, 50};
const byte OLIVEDRAB_RGB[3] = {107, 142, 35};
const byte OLIVE_RGB[3] = {128, 128, 0};
const byte DARKOLIVEGREEN_RGB[3] = {85, 107, 47};
const byte MEDIUMAQUAMARINE_RGB[3] = {102, 205, 170};
const byte DARKSEAGREEN_RGB[3] = {143, 188, 139};
const byte LIGHTSEAGREEN_RGB[3] = {32, 178, 170};
const byte DARKCYAN_RGB[3] = {0, 139, 139};
const byte TEAL_RGB[3] = {0, 128, 128};

const byte AQUA_RGB[3] = {0, 255, 255};
const byte CYAN_RGB[3] = {0, 255, 255};
const byte LIGHTCYAN_RGB[3] = {224, 255, 255};
const byte PALETURQUOISE_RGB[3] = {175, 238, 238};
const byte AQUAMARINE_RGB[3] = {127, 255, 212};
const byte TURQUOISE_RGB[3] = {64, 224, 208};
const byte MEDIUMTURQUOISE_RGB[3] = {72, 209, 204};
const byte DARKTURQUOISE_RGB[3] = {0, 206, 209};
const byte CADETBLUE_RGB[3] = {95, 158, 160};
const byte STEELBLUE_RGB[3] = {70, 130, 180};
const byte LIGHTSTEELBLUE_RGB[3] = {176, 196, 222};
const byte POWDERBLUE_RGB[3] = {176, 224, 230};
const byte LIGHTBLUE_RGB[3] = {173, 216, 230};
const byte SKYBLUE_RGB[3] = {135, 206, 235};
const byte LIGHTSKYBLUE_RGB[3] = {135, 206, 250};
const byte DEEPSKYBLUE_RGB[3] = {0, 191, 255};
const byte DODGERBLUE_RGB[3] = {30, 144, 255};
const byte CORNFLOWERBLUE_RGB[3] = {100, 149, 237};
const byte MEDIUMSLATEBLUE_RGB[3] = {123, 104, 238};
const byte ROYALBLUE_RGB[3] = {65, 105, 225};
const byte BLUE_RGB[3] = {0, 0, 255};
const byte MEDIUMBLUE_RGB[3] = {0, 0, 205};
const byte DARKBLUE_RGB[3] = {0, 0, 139};
const byte NAVY_RGB[3] = {0, 0, 128};
const byte MIDNIGHTBLUE_RGB[3] = {25, 25, 112};

const byte CORNSILK_RGB[3] = {255, 248, 220};
const byte BLANCHEDALMOND_RGB[3] = {255, 235, 205};
const byte BISQUE_RGB[3] = {255, 228, 196};
const byte NAVAJOWHITE_RGB[3] = {255, 222, 173};
const byte WHEAT_RGB[3] = {245, 222, 179};
const byte BURLYWOOD_RGB[3] = {222, 184, 135};
const byte TAN_RGB[3] = {210, 180, 140};
const byte ROSYBROWN_RGB[3] = {188, 143, 143};
const byte SANDYBROWN_RGB[3] = {244, 164, 96};
const byte GOLDENROD_RGB[3] = {218, 165, 32};
const byte DARKGOLDENROD_RGB[3] = {184, 134, 11};
const byte PERU_RGB[3] = {205, 133, 63};
const byte CHOCOLATE_RGB[3] = {210, 105, 30};
const byte SADDLEBROWN_RGB[3] = {139, 69, 19};
const byte SIENNA_RGB[3] = {160, 82, 45};
const byte BROWN_RGB[3] = {165, 42, 42};
const byte MAROON_RGB[3] = {128, 0, 0};

const byte WHITE_RGB[3] = {255, 255, 255};
const byte SNOW_RGB[3] = {255, 250, 250};
const byte HONEYDEW_RGB[3] = {240, 255, 240};
const byte MINTCREAM_RGB[3] = {245, 255, 250};
const byte AZURE_RGB[3] = {240, 255, 255};
const byte ALICEBLUE_RGB[3] = {240, 248, 255};
const byte GHOSTWHITE_RGB[3] = {248, 248, 255};
const byte WHITESMOKE_RGB[3] = {245, 245, 245};
const byte SEASHELL_RGB[3] = {255, 245, 238};
const byte BEIGE_RGB[3] = {245, 245, 220};
const byte OLDLACE_RGB[3] = {253, 245, 230};
const byte FLORALWHITE_RGB[3] = {255, 250, 240};
const byte IVORY_RGB[3] = {255, 255, 240};
const byte ANTIQUEWHITE_RGB[3] = {250, 235, 215};
const byte LINEN_RGB[3] = {250, 240, 230};
const byte LAVENDERBLUSH_RGB[3] = {255, 240, 245};
const byte MISTYROSE_RGB[3] = {255, 228, 225};

const byte GAINSBORO_RGB[3] = {220, 220, 220};
const byte LIGHTGRAY_RGB[3] = {211, 211, 211};
const byte SILVER_RGB[3] = {192, 192, 192};
const byte DARKGRAY_RGB[3] = {169, 169, 169};
const byte GRAY_RGB[3] = {128, 128, 128};
const byte DIMGRAY_RGB[3] = {105, 105, 105};
const byte LIGHTSLATEGRAY_RGB[3] = {119, 136, 153};
const byte SLATEGRAY_RGB[3] = {112, 128, 144};
const byte DARKSLATEGRAY_RGB[3] = {47, 79, 79};
const byte BLACK_RGB[3] = {0, 0, 0};
1 Like

Unlikely anyone needs so many named colours, also this will eat the board memory

Those names are really arbitrary without gamma correction and a colour space. I've done stuff like that, but with really obvious colours.

Feel free to tell the W3C. They are the ones who chose to define 140 names.

There's no harm in it, in fact it is often useful to fill in some colours without doodling around with RGB values. It's just that the names might not correspond to the colours that you might expect.

const values in that context don't use even a single byte of memory.

What do you mean? each colour is 3 non-quantum bytes, you have to put it somewhere

The compiler is smart enough to not allocate space for any unused colors. You only pay for what you use.

dunno about that, in theory yes, in practice I had to generate my own FFT tables because precalculated tables provided by Arduino library were taking too much memory

And, if you only index those arrays with compile-time constants, it might even inline their contents.