NeoPixel WS2812b Gamma Table For Color Reproduction

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
Stabitha
 
Posts: 5
Joined: Wed Jun 25, 2014 11:46 pm

NeoPixel WS2812b Gamma Table For Color Reproduction

Post by Stabitha »

Hi everyone. Apologies if there is a much better forum to make this post. Please let me know if I should move it.

I modified Phil's gamma table from the NeoMatrix repository by scaling red and blue light back based on the radiant intensities (estimated) of the red, green, and blue LEDs used by World Semi.

Here they are:
static const byte _G[32] = { 0, 2, 4, 7, 9, 12, 14, 17, 21, 25, 29, 34, 39, 44, 51, 57, 64, 71, 79, 88, 97, 107, 118, 129, 140, 152, 165, 178, 192, 206, 221, 237};

static const byte _B[32] = { 0, 1, 3, 4, 6, 7, 9, 11, 14, 16, 19, 22, 25, 29, 33, 37, 42, 46, 52, 57, 64, 70, 77, 84, 92, 100, 108, 117, 126, 135, 145, 155};

static const byte _R[32] = { 0, 1, 3, 6, 7, 10, 12, 14, 18, 21, 25, 29, 33, 37, 43, 48, 54, 60, 67, 74, 82, 91, 100, 109, 118, 129, 140, 151, 162, 174, 187, 200};

They do a good job of making colors based on (r,g,b) values selected from a computer monitor. They make white without tinting, cream colors like pink, as well as some darker gray colors. It also does decently well with olive, mustard, and other duller colors.

If anyone ends up using these tables, please post back here on how they worked for you. I have only tested them with my own display setup with 4m 60LED neopixel strip.

PS If I start using something like fadecandy, this will already be taken care of, making my tables superfluous.... right?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: NeoPixel WS2812b Gamma Table For Color Reproduction

Post by adafruit_support_rick »

Thanks for posting!

Yes, gamma should already be taken care of with FadeCandy.

User avatar
Ninetou
 
Posts: 1
Joined: Wed Jan 18, 2017 3:35 pm

Re: NeoPixel WS2812b Gamma Table For Color Reproduction

Post by Ninetou »

Good stuff Stabitha.
Mind explaining why your LUT has only 32 steps? Could you share input values you used for calculating gamma for each of the channels? (assuming Phil's algorithm was unchanged)

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”