ESPHome  2024.11.0
Static Public Member Functions
esphome::display::ColorUtil Class Reference

#include <display_color_utils.h>

Static Public Member Functions

static Color to_color (uint32_t colorcode, ColorOrder color_order, ColorBitness color_bitness=ColorBitness::COLOR_BITNESS_888, bool right_bit_aligned=true)
 
static Color rgb332_to_color (uint8_t rgb332_color)
 
static uint8_t color_to_332 (Color color, ColorOrder color_order=ColorOrder::COLOR_ORDER_RGB)
 
static uint16_t color_to_565 (Color color, ColorOrder color_order=ColorOrder::COLOR_ORDER_RGB)
 
static uint32_t color_to_grayscale4 (Color color)
 
static uint8_t color_to_index8_palette888 (Color color, const uint8_t *palette)
 
static Color index8_to_color_palette888 (uint8_t index, const uint8_t *palette)
 

Detailed Description

Definition at line 10 of file display_color_utils.h.

Member Function Documentation

◆ color_to_332()

static uint8_t esphome::display::ColorUtil::color_to_332 ( Color  color,
ColorOrder  color_order = ColorOrder::COLOR_ORDER_RGB 
)
inlinestatic

Definition at line 72 of file display_color_utils.h.

◆ color_to_565()

static uint16_t esphome::display::ColorUtil::color_to_565 ( Color  color,
ColorOrder  color_order = ColorOrder::COLOR_ORDER_RGB 
)
inlinestatic

Definition at line 89 of file display_color_utils.h.

◆ color_to_grayscale4()

static uint32_t esphome::display::ColorUtil::color_to_grayscale4 ( Color  color)
inlinestatic

Definition at line 106 of file display_color_utils.h.

◆ color_to_index8_palette888()

static uint8_t esphome::display::ColorUtil::color_to_index8_palette888 ( Color  color,
const uint8_t *  palette 
)
inlinestatic

Definition at line 120 of file display_color_utils.h.

◆ index8_to_color_palette888()

static Color esphome::display::ColorUtil::index8_to_color_palette888 ( uint8_t  index,
const uint8_t *  palette 
)
inlinestatic

Definition at line 153 of file display_color_utils.h.

◆ rgb332_to_color()

static Color esphome::display::ColorUtil::rgb332_to_color ( uint8_t  rgb332_color)
inlinestatic

Definition at line 69 of file display_color_utils.h.

◆ to_color()

static Color esphome::display::ColorUtil::to_color ( uint32_t  colorcode,
ColorOrder  color_order,
ColorBitness  color_bitness = ColorBitness::COLOR_BITNESS_888,
bool  right_bit_aligned = true 
)
inlinestatic

Definition at line 12 of file display_color_utils.h.


The documentation for this class was generated from the following file: