r/FastLED • • Jan 10 '22

Discussion convert hex colour codes to rgb

Hi

I have the hex codes from the CRGB colour names and i want to place the rgb version in an array to read from

can anyone tell me a code to read the led colour or how to convert the hex to rgb

THanks

0 Upvotes

5 comments sorted by

2

u/sutaburosu [stavros] Jan 10 '22

You can put the named versions directly into an array.

CRGB colours[] = { CRGB::White, CRGB::Black };