FastLED 3.9.15
|
Misc utility functions for palettes, blending, and more.
This file is being refactored.
Definition in file colorutils.cpp.
#include <math.h>
#include <stdint.h>
#include "FastLED.h"
#include "fl/assert.h"
#include "fl/colorutils.h"
#include "fl/unused.h"
#include "fl/xymap.h"
Go to the source code of this file.
Namespaces | |
namespace | fl |
Implements a simple red square effect for 2D LED grids. | |
Macros | |
#define | __PROG_TYPES_COMPAT__ |
#define | FASTLED_INTERNAL |
Functions | |
CRGB | fl::applyGamma_video (const CRGB &orig, float gamma) |
CRGB | fl::applyGamma_video (const CRGB &orig, float gammaR, float gammaG, float gammaB) |
uint8_t | fl::applyGamma_video (uint8_t brightness, float gamma) |
CHSV | fl::blend (const CHSV &p1, const CHSV &p2, fract8 amountOfP2, TGradientDirectionCode directionCode) |
CHSV * | fl::blend (const CHSV *src1, const CHSV *src2, CHSV *dest, uint16_t count, fract8 amountOfsrc2, TGradientDirectionCode directionCode) |
CRGB | fl::blend (const CRGB &p1, const CRGB &p2, fract8 amountOfP2) |
CRGB * | fl::blend (const CRGB *src1, const CRGB *src2, CRGB *dest, uint16_t count, fract8 amountOfsrc2) |
CHSV | fl::ColorFromPalette (const CHSVPalette16 &pal, uint8_t index, uint8_t brightness, TBlendType blendType) |
CHSV | fl::ColorFromPalette (const CHSVPalette256 &pal, uint8_t index, uint8_t brightness, TBlendType) |
CHSV | fl::ColorFromPalette (const CHSVPalette32 &pal, uint8_t index, uint8_t brightness, TBlendType blendType) |
CRGB | fl::ColorFromPalette (const CRGBPalette16 &pal, uint8_t index, uint8_t brightness, TBlendType blendType) |
CRGB | fl::ColorFromPalette (const CRGBPalette256 &pal, uint8_t index, uint8_t brightness, TBlendType) |
CRGB | fl::ColorFromPalette (const CRGBPalette32 &pal, uint8_t index, uint8_t brightness, TBlendType blendType) |
CRGB | fl::ColorFromPalette (const TProgmemRGBPalette16 &pal, uint8_t index, uint8_t brightness, TBlendType blendType) |
CRGB | fl::ColorFromPalette (const TProgmemRGBPalette32 &pal, uint8_t index, uint8_t brightness, TBlendType blendType) |
CRGB | fl::ColorFromPaletteExtended (const CRGBPalette16 &pal, uint16_t index, uint8_t brightness, TBlendType blendType) |
CRGB | fl::ColorFromPaletteExtended (const CRGBPalette256 &pal, uint16_t index, uint8_t brightness, TBlendType blendType) |
CRGB | fl::ColorFromPaletteExtended (const CRGBPalette32 &pal, uint16_t index, uint8_t brightness, TBlendType blendType) |
void | fl::fade_raw (CRGB *leds, uint16_t num_leds, uint8_t fadeBy) |
void | fl::fade_video (CRGB *leds, uint16_t num_leds, uint8_t fadeBy) |
void | fl::fadeLightBy (CRGB *leds, uint16_t num_leds, uint8_t fadeBy) |
void | fl::fadeToBlackBy (CRGB *leds, uint16_t num_leds, uint8_t fadeBy) |
void | fl::fadeUsingColor (CRGB *leds, uint16_t numLeds, const CRGB &colormask) |
CRGB | fl::HeatColor (uint8_t temperature) |
uint8_t | fl::lsrX4 (uint8_t dividend) |
Helper function to divide a number by 16, aka four logical shift right (LSR)'s. | |
CRGB & | fl::napplyGamma_video (CRGB &rgb, float gamma) |
CRGB & | fl::napplyGamma_video (CRGB &rgb, float gammaR, float gammaG, float gammaB) |
void | fl::napplyGamma_video (CRGB *rgbarray, uint16_t count, float gamma) |
void | fl::napplyGamma_video (CRGB *rgbarray, uint16_t count, float gammaR, float gammaG, float gammaB) |
CHSV & | fl::nblend (CHSV &existing, const CHSV &overlay, fract8 amountOfOverlay, TGradientDirectionCode directionCode) |
void | fl::nblend (CHSV *existing, const CHSV *overlay, uint16_t count, fract8 amountOfOverlay, TGradientDirectionCode directionCode) |
CRGB & | fl::nblend (CRGB &existing, const CRGB &overlay, fract8 amountOfOverlay) |
void | fl::nblend (CRGB *existing, const CRGB *overlay, uint16_t count, fract8 amountOfOverlay) |
void | fl::nblendPaletteTowardPalette (CRGBPalette16 ¤t, CRGBPalette16 &target, uint8_t maxChanges) |
void | fl::nscale8 (CRGB *leds, uint16_t num_leds, uint8_t scale) |
void | fl::nscale8_video (CRGB *leds, uint16_t num_leds, uint8_t scale) |
void | fl::UpscalePalette (const class CHSVPalette16 &srcpal16, class CHSVPalette256 &destpal256) |
void | fl::UpscalePalette (const class CHSVPalette16 &srcpal16, class CHSVPalette32 &destpal32) |
void | fl::UpscalePalette (const class CHSVPalette32 &srcpal32, class CHSVPalette256 &destpal256) |
void | fl::UpscalePalette (const class CRGBPalette16 &srcpal16, class CRGBPalette256 &destpal256) |
void | fl::UpscalePalette (const class CRGBPalette16 &srcpal16, class CRGBPalette32 &destpal32) |
void | fl::UpscalePalette (const class CRGBPalette32 &srcpal32, class CRGBPalette256 &destpal256) |