I have almost finished  a small project for a lamp based on the Fire2012 sketch.

I have almost finished a small project for a lamp based on the Fire2012 sketch. I have it working OK but find that I would like to tweak slightly the color palette used such that I get fewer white pixels and more yellow. Any suggestions ?

Like you, I found the white a bit much, so I looked for some CRGB values between red, orange and white and modified the palette a bit. Can’t recall any specifics though.

@JP_Roy have you used the “Fire2012WithPalette” ?

I think the easiest thing to do is use Fire2012WithPalette, and just hand-tweak the color palette, by which I actually mean that you can hand-design any color palette you like.

So instead of a gradient from white to yellow to red to black, you could have it be a gradient from yellow to orange to red to black – no white at all if you like.

The palettes it uses have 16 slots for color and you can define them like this:

CRGBPalette16 myFire = {
color0,
color1,
color2,

color15
};

where each color can be defined several ways, eg CRGB( 255, 160, 0) or CRGB::Orange or CHSV( 9, 255, 255) etc.

Check out the Fire2012WithPalette example.

You could also add a line in either Fire example that instead of rendering each heat cell at full ‘temperature’, scaled down the very hottest cells a bit and rendered them as not quite as hot. This would make the very hottest cells appear yellower, not quite as white.

@Mike_Thornbury Yes I am using the Fire2012WithPalette

@JP_Roy i was facing the same issue. When using it with a few pixels (ie <10) you have a lot of whites
how many pixels are you using ?
1 single strip of pixels or muliplte

Hi @Mark_Kriegsman , I actually did change Yellow to Orange and White to Yellow but I did not want to eliminate white completely. Also quickly tried to add a 5th item to the line as follows…

gPal = CRGBPalette16( CRGB::Black, CRGB::Red, CRGB::Orange, CRGB::Yellow, CRGB::White);

But that did not go well … :wink:

I did finally locate and quickly scanned the Color Palette example before going to bed last night with my brains feeling like an extra ripe banana. I Noticed it had some clues about custom palettes.

Thanks for the hints, brain feels slightly firmer this morning I will dig through custom palettes in more details…

@Peter_Spriet , I am actually using 4 strips of 25 WS2812 and each have their own distinct flame pattern. 25 LEDs, that is all that fits vertically in the lamp enclosure that I recycled to house that project. I will post pictures once I finalize the assembly.

Each strip is driven by a separate pin on an Arduino Uno . I still have a few of those leftover and wanted to give them a useful life… :wink:

One of the things I’ve found useful about explicitly listing all 16 colors you want is that you can control the proportions, eg
W Y Y Y O O O O R R R R R R R R B B B B

Let us know what you come up with, or if you have other ideas or questions!

Hi @Mark_Kriegsman , I finally found the simplest of solution to tuning down the Whites of my Fire lamp project.

Now why didn’t I think of that before !? I simply replaced the White color in your example with Gray. ( Also tried DimGray, LightGray, DarkGray… :wink:

I did play and learned about Custom palettes a bit however, I must go back to my main project (A Xmas tree, for which I finally received parts from China ! ) I am satisfied with the Fire animation as it is for now. But I will return to it eventually to see what magical custom palette I can come up with that would make myFire even hotter.

Thank you very much for all suggestions !

Brilliant!
(Or less-brilliant, actually!)

I am also waiting for parts to complete the Fire lamp assembly, tis a pair of lamps actually… Love them Chinese Ebay seller prices but MAN… the shipping delays !!

Soon, I hope, I will show off that project…