User Manual
You might notice in some sketches that we
never
use ColorHSV()
without
passing the result through gamma32() before
setting a pixel’s color. It’s that desirable.
However, the gamma32 operation is
not built in
to ColorHSV() — it must be called as a separate operation — for a few
reasons, including that advanced programmers might want to provide a more specific color-correction function of their
own design (gamma32() is a “one size fits most” approximation) or may need to keep around the original “numerically
but not perceptually correct” numbers.
There is no corresponding reverse operation.
When you set a pixel to a color filtered through gamma32(), reading back
the pixel value yields that filtered color,
not
the original RGB value. It’s precisely because of this sort of decimation that
advanced DotStar programs often treat the pixel buffer as a
write-only
resource…they generate each full frame of
animation based on their own program state,
not
as a series of read-modify-write operations.
Help!
I’m calling setPixel() but nothing’s happening!
uint32_t rgbcolor = strip.gamma32(strip.ColorHSV(hue, sat, val));
© Adafruit Industries https://learn.adafruit.com/adafruit-dotstar-leds Page 31 of 48