ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
display_color_utils.h File Reference

Go to the source code of this file.

Data Structures

class  esphome::display::ColorUtil
 
class  esphome::display::Rgb565ToMono
 color_to_mono() of an RGB565 value as ColorUtil::to_color() reads it, from table lookups instead of a division per channel. More...
 

Namespaces

namespace  esphome
 
namespace  esphome::display
 

Enumerations

enum  esphome::display::ColorOrder : uint8_t { esphome::display::COLOR_ORDER_RGB = 0 , esphome::display::COLOR_ORDER_BGR = 1 , esphome::display::COLOR_ORDER_GRB = 2 }
 
enum  esphome::display::ColorBitness : uint8_t { esphome::display::COLOR_BITNESS_888 = 0 , esphome::display::COLOR_BITNESS_565 = 1 , esphome::display::COLOR_BITNESS_332 = 2 }
 

Functions

constexpr uint8_t esphome::display::expand_field (uint8_t value, uint8_t bits)
 esp_scale(value, (1 << bits) - 1) for a field of 2, 3, 5, 6 or 8 bits, as a multiply and shift that gives the same result for every field value.
 
Color esphome::display::apply_color_order (Color color, ColorOrder order)
 
constexpr uint8_t esphome::display::rec601_luma (Color color)
 Rec.601 luma of an RGB color, for optimum perceptual brightness.
 
constexpr uint8_t esphome::display::color_to_mono (Color color)
 Map an RGB color to a single monochrome bit: 1 = white, 0 = black.