If I wanted to write an all encompassing function that passed a string value for the color name to fill_solids, how could I got about doing that? This doesn’t work:
So CRGB::Red is just a shortcut for 0xFF0000 or { 255, 0, 0 }, CRGB::Green is 0x00FF00 or { 0, 255, 0 }, etc.
In your example, where would the color name String come from? What would be calling this function? Are you wanting to pass these over Serial, Wi-Fi, etc?
At some point, yes, I’ll be passing values either via wifi or bluetooth/serial. For the time being, I’m using a state machine switch case in the Loop, calling the function with various colors amidst other patterns. I’m looking to keep the code as svelte as possible for my own sanity.
So, for example, I’ll have one case statement that calls runColor(FireBrick); and another that calls runColor(DodgerBlue);