struct
MiriColor
- Module
- Miri
- Header
#include "Miri/Core/MiriGeometry.h"- Namespace
Miri
Properties
| Type | Name | Description |
|---|---|---|
float | R | Default 1.0f. |
float | G | Default 1.0f. |
float | B | Default 1.0f. |
float | A | Default 1.0f. |
static const MiriColor | White | |
static const MiriColor | Black | |
static const MiriColor | Red | |
static const MiriColor | Green | |
static const MiriColor | Blue | |
static const MiriColor | Yellow | |
static const MiriColor | Transparent |
Constructors
| Signature | Name | Description |
|---|---|---|
MiriColor() = default | MiriColor | |
constexpr MiriColor(float r, float g, float b, float a) : R(r), G(g), B(b), A(a) | MiriColor | |
constexpr MiriColor(float r, float g, float b) : R(r), G(g), B(b), A(1.0f) | MiriColor |
Public functions
| Returns | Name | Description |
|---|---|---|
uint32_t | ToU32 | |
MiriColor | FromU32 | |
MiriColor | Lerp | |
MiriColor | PremultiplyAlpha | |
MiriColor | WithAlpha | |
MiriColor | sRGBToLinear | |
MiriColor | LinearTosRGB | |
MiriColor | FromHSV | |
void | ToHSV | |
bool | operator== | |
bool | operator!= |
Function details
MiriColor
C++
MiriColor() = defaultMiriColor
C++
constexpr MiriColor(float r, float g, float b, float a) : R(r), G(g), B(b), A(a)MiriColor
C++
constexpr MiriColor(float r, float g, float b) : R(r), G(g), B(b), A(1.0f)ToU32
C++
uint32_t ToU32() constFromU32
C++
static MiriColor FromU32(uint32_t color)Lerp
C++
MiriColor Lerp(const MiriColor& other, float t) constPremultiplyAlpha
C++
MiriColor PremultiplyAlpha() constWithAlpha
C++
MiriColor WithAlpha(float a) constsRGBToLinear
C++
MiriColor sRGBToLinear() constLinearTosRGB
C++
MiriColor LinearTosRGB() constFromHSV
C++
static MiriColor FromHSV(float h, float s, float v, float a = 1.0f)ToHSV
C++
void ToHSV(float& h, float& s, float& v) constoperator==
C++
bool operator==(const MiriColor& other) constoperator!=
C++
bool operator!=(const MiriColor& other) constGenerated from Miri/Core/MiriGeometry.h via miri.json · Dec 5, 2026Version 1.1.0