#include <color.hpp>
|
| constexpr | RGBA () |
| | Default constructor initializes to transparent black.
|
| |
| constexpr | RGBA (std::uint8_t red, std::uint8_t green, std::uint8_t blue, std::uint8_t alpha=255) |
| | Construct RGBA color from components.
|
| |
| constexpr | RGBA (const RGB &rgb) |
| | Construct RGBA from RGB (fully opaque).
|
| |
| constexpr auto | operator== (const RGBA &other) const noexcept -> bool=default |
| | Equality comparison.
|
| |
| constexpr auto | to_rgb () const noexcept -> RGB |
| | Convert to RGB (discards alpha channel).
|
| |
| constexpr auto | to_grayscale () const noexcept -> std::uint8_t |
| | Convert to grayscale using standard luminance formula.
|
| |
|
| std::uint8_t | a |
| | Alpha component (0-255, 0=transparent, 255=opaque)
|
| |
| std::uint8_t | b |
| | Blue component (0-255)
|
| |
| std::uint8_t | g |
| | Green component (0-255)
|
| |
| std::uint8_t | r |
| | Red component (0-255)
|
| |
◆ RGBA() [1/3]
| constexpr epaper::RGBA::RGBA |
( |
| ) |
|
|
inlineconstexpr |
◆ RGBA() [2/3]
| constexpr epaper::RGBA::RGBA |
( |
std::uint8_t |
red, |
|
|
std::uint8_t |
green, |
|
|
std::uint8_t |
blue, |
|
|
std::uint8_t |
alpha = 255 |
|
) |
| |
|
inlineconstexpr |
Construct RGBA color from components.
- Parameters
-
| red | Red component (0-255) |
| green | Green component (0-255) |
| blue | Blue component (0-255) |
| alpha | Alpha component (0-255, default 255=opaque) |
◆ RGBA() [3/3]
| constexpr epaper::RGBA::RGBA |
( |
const RGB & |
rgb | ) |
|
|
inlineexplicitconstexpr |
Construct RGBA from RGB (fully opaque).
- Parameters
-
◆ operator==()
| constexpr auto epaper::RGBA::operator== |
( |
const RGBA & |
other | ) |
const -> bool=default |
|
constexprdefaultnoexcept |
◆ to_grayscale()
| constexpr auto epaper::RGBA::to_grayscale |
( |
| ) |
const -> std::uint8_t |
|
inlineconstexprnoexcept |
◆ to_rgb()
| constexpr auto epaper::RGBA::to_rgb |
( |
| ) |
const -> RGB |
|
inlineconstexprnoexcept |
| std::uint8_t epaper::RGBA::a |
| std::uint8_t epaper::RGBA::b |
| std::uint8_t epaper::RGBA::g |
| std::uint8_t epaper::RGBA::r |
The documentation for this struct was generated from the following file: