Files
mcolor/include/ColorFormats.hpp
2025-02-26 15:05:14 -05:00

78 lines
947 B
C++

#pragma once
using u8 = uint8_t;
/// A structure representing color in Red, Green, Blue format, 8 bits-per-color, or 24-bit, or True-color.
struct RGB {
u8 r;
u8 g;
u8 b;
};
struct RGBA {
u8 r;
u8 g;
u8 b;
u8 a;
};
struct RGBf {
float r;
float g;
float b;
};
struct RGBAf {
float r;
float g;
float b;
float a;
};
/// A structure representing color in Hue, Chroma, Value format.
struct HSV {
float h;
float s;
float v;
};
struct HSVA {
float h;
float s;
float v;
float a;
};
struct HSL {
float h;
float s;
float l;
};
struct HSLA {
float h;
float s;
float l;
float a;
};
/// A structure representing a Lum, Chroma, Lightness value.
struct LCH {
float l;
float h;
float c;
};
struct LCHA {
float l;
float h;
float c;
float a;
};
struct CMYK {
float c;
float m;
float y;
float k;
};