Arduino Gradient Color Palette Explained

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Hi,

 

I was wondering if I could have some help understanding what the color palette actually does in the Fastled.h library. 

 

My understanding is, you specify which colour you want and then where it will trigger E.g (0-255). 

 

So for example this heatmap_gp from 128-224, will run from red to yellow but as it is transition will make all the colours from mixing red at 255 with g, as its increased to 255?

 

Apologizes if that's convoluted.

 

Cheers 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That is a common 24-bit RGB pallet. It is all based on the  fact that you eye combines the separate colors into a single perceived color. The part of the  table that looks like

 

0,  0,  0
255,0,  0
255,255,0
255,255,255

has 3 columns, one for a red LED brightness, next for green LED brightness, and last (right) for blue LED brightness. Each brightness goes from 0 (off) to 255 which is 100% on.

 

The first row has all LEDS off, so that represents black.

The second row  has the  red LED 100% on, so that is red.

The third row has red LED 100% on and green 100% on, so that is bright yellow.

The last row has all 3 LEDs 100% on, so it is white.

 

If there had been a row that  was 0,0,255 that would be  pure blue.

 

That is the way the the RGB pallet works.

 

What is odd is the assignment of integers for colors in the spectrum from red to white. That must be for a purpose that is unique to the software.

 

Jim

 

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Sun. Nov 17, 2019 - 04:23 AM