I am using the TwinkleFox library and I’d like to make some custom colors for a palette. I followed an example from the wiki but it’s not working, I get strange output whereas it works fine with other palettes. Should this work? If not how do you do it?
That looks correct. Can you post your full program (or simplified version of your full program) to http://gist.github.com?
Also, what do you mean by “strange output”?
@Albert_McCoy All of the other palettes work correctly with the ampersand, it’s the same as the TwinkleFox example sketch. I don’t have a good enough understanding of color objects and how they all relate I guess.
The reason I want to do this is to be able to tune the HSV values by hand, then put them into the array for Twinkling. HSV is easy to work with but right now I have to convert to RGB then convert to Hex.
I tried defining the colors as CRGB values like “CRGB easter_purple = CRGB(29, 0, 59);” but the only way it will run is if the colors are defined as constants like “#define easter_purple 0x1D003B”. Has anyone been able to use custom colors in palettes when defined as CRGBs or HSVs? In the examples for TProgmemPalette16 palettes the colors are predefined like CRGB::Red.
This example uses gradient palettes but could be modified and wired to a potentiometer or some something else to change colors at will. Maybe would allow you to experiment as you’d like.