Adding and Adjusting Colors in the default color list

Hello,

I am trying to adjust colors and add them in the default color list in Fett’s h file, but I am confused about something. What are these 5-digit color values, and where do they come from? It goes against everything I know about RGB. Is there a place I can convert RGB values to 5-digit values? Am I missing something? Examples below are teh Gold, Ice Blue, Indigo, etc.

Thanks for any help!

static constexpr ColorListEntry color_list_[] = {
  { Red::color(), COLOR_RED },
  { OrangeRed::color(), COLOR_ORANGERED },
  { DarkOrange::color(), COLOR_DARKORANGE },
  { Orange::color(), COLOR_ORANGE },
  { { 46260, 33410, 0 }, COLOR_GOLD },
  { Yellow::color(), COLOR_YELLOW },
  { GreenYellow::color(), COLOR_GREENYELLOW },
  { Green::color(), COLOR_GREEN },
  { Aquamarine::color(), COLOR_AQUAMARINE },
  { Cyan::color(), COLOR_CYAN },
  { DeepSkyBlue::color(), COLOR_DEEPSKYBLUE },
  { DodgerBlue::color(), COLOR_DODGERBLUE },
  { Blue::color(), COLOR_BLUE },
  { { 7710, 15420, 51400 }, COLOR_ICEBLUE },
  { { 11102, 92, 53864 }, COLOR_INDIGO },
  { { 24000, 0, 50536 }, COLOR_PURPLE },
  { { 30324, 0, 49768 }, COLOR_DEEPPURPLE },
  { Magenta::color(), COLOR_MAGENTA },
  { DeepPink::color(), COLOR_DEEPPINK },
  { { 25700, 25700, 38550 }, COLOR_SILVER },
  { { 21845, 21845, 51400 }, COLOR_GLACIER },
  { { 46260, 46260, 65535 }, COLOR_ICEWHITE },
  { LightCyan::color(), COLOR_LIGHTCYAN },
  { Moccasin::color(), COLOR_MOCCASIN },
  { LemonChiffon::color(), COLOR_LEMONCHIFFON },
  { NavajoWhite::color(), COLOR_NAVAJOWHITE },
  { White::color(), COLOR_WHITE }

Those are 16-bit color values.

If you want to convert them there are different online converters.

The standard 3 digit rgb values are 8-bit, so if you want, you can convert values back and forth to figure them out.

1 Like

They are linear 16-bit color values.
You can convert from normal screen values like this:

R_{16} = ({R_8} / {255})^{2.2} * 65535
G_{16} = ({G_8} / {255})^{2.2} * 65535
B_{16} = ({B_8} / {255})^{2.2} * 65535

Note that the voice prompts won’t automatically update, so if you change the values a lot, it might get confusing.

The ProffieOS 8 menu system has a color menu where all the colors (and their names) live on the SD card, which makes it fairly easy to modify.

1 Like

Thank you for the reply! I will search for an RGB 8-bit to 16-bit converter

Thank you Prof, especially for the formula; this is very helpful. I have not used OS 8 yet, but I will be very soon! Excited to test it out!

Where in the menu system in OS 8 is the list?

If I remember correctly:

Edit Settings → Edit Preset → Edit Style N → Edit Style Options → {select a color option} → Color List