Reputation: 2279
I am using an LED strip of an cascade of 30 WS2812 RGB LEDs.
Since the intensity of each color channel is different I like to adjust the output. My idea is to have a formula that takes a std. RGB value and spits out the corrected one.
The ws2812 datasheet shows a table with intensity. I am looking for a way to get a formula to calculate the the GBR value from a RGB one.
There is a adafruit LED lib but I didn't figured out how they do the translation of the RGB values.
So how is the good way to figure out/get the right formula to perform a RGB to WS2812 RGB conversion?
Upvotes: 0
Views: 2167
Reputation: 109
If you use the FastLED library, then there's built-in functionality to perform color-correction.
See LEDColorCorrection
in file color.h
.
See an example of how to use FastLED to do ColorCorrection.
I would recommend just trying the predefined values (or make up your own ... it's just an RGB
value). If you're using typical consumer strips, note that strips vary ... between vendors, between manufacturing runs, based on temperature, etc. Perception also [varies][4]
based on surrounding environment.
Upvotes: 0