![]() |
Nazara Engine
0.4
A fast, complete, cross-platform API designed for game development
|
Core class that represents a color. More...
Public Member Functions | |
| Color () | |
| Constructs a Color object by default. | |
| Color (UInt8 red, UInt8 green, UInt8 blue, UInt8 alpha=255) | |
| Constructs a Color object with values. More... | |
| Color (UInt8 lightness) | |
| Constructs a Color object with a light level. More... | |
| Color (UInt8 color[3], UInt8 alpha=255) | |
| Constructs a Color object with values. More... | |
| Color (const Color &color)=default | |
| bool | IsOpaque () const |
| Return true is the color has no degree of transparency. More... | |
| String | ToString () const |
| Converts this to string. More... | |
| Color | operator+ (const Color &angles) const |
| Adds two colors together. More... | |
| Color | operator* (const Color &angles) const |
| Multiplies two colors together. More... | |
| Color | operator+= (const Color &angles) |
| Adds the color to this. More... | |
| Color | operator*= (const Color &angles) |
| Multiplies the color to this. More... | |
| bool | operator== (const Color &angles) const |
| Checks whether the two colors are equal. More... | |
| bool | operator!= (const Color &angles) const |
| Checks whether the two colors are equal. More... | |
Static Public Member Functions | |
| static Color | FromCMY (float cyan, float magenta, float yellow) |
| Converts CMY representation to RGB. More... | |
| static Color | FromCMYK (float cyan, float magenta, float yellow, float black) |
| Converts CMYK representation to RGB. More... | |
| static Color | FromHSL (UInt8 hue, UInt8 saturation, UInt8 lightness) |
| Converts HSL representation to RGB. More... | |
| static Color | FromHSV (float hue, float saturation, float value) |
| Converts HSV representation to RGB. More... | |
| static Color | FromXYZ (const Vector3f &vec) |
| Converts XYZ representation to RGB. More... | |
| static Color | FromXYZ (float x, float y, float z) |
| Converts XYZ representation to RGB. More... | |
| static void | ToCMY (const Color &color, float *cyan, float *magenta, float *yellow) |
| Converts RGB representation to CMYK. More... | |
| static void | ToCMYK (const Color &color, float *cyan, float *magenta, float *yellow, float *black) |
| Converts RGB representation to CMYK. More... | |
| static void | ToHSL (const Color &color, UInt8 *hue, UInt8 *saturation, UInt8 *lightness) |
| Converts RGB representation to HSL. More... | |
| static void | ToHSV (const Color &color, float *hue, float *saturation, float *value) |
| Converts RGB representation to HSV. More... | |
| static void | ToXYZ (const Color &color, Vector3f *vec) |
| Converts RGB representation to XYZ. More... | |
| static void | ToXYZ (const Color &color, float *x, float *y, float *z) |
| Converts RGB representation to XYZ. More... | |
Public Attributes | |
| UInt8 | r |
| UInt8 | g |
| UInt8 | b |
| UInt8 | a |
Static Public Attributes | |
| static NAZARA_CORE_API const Color | Black |
| static NAZARA_CORE_API const Color | Blue |
| static NAZARA_CORE_API const Color | Cyan |
| static NAZARA_CORE_API const Color | Green |
| static NAZARA_CORE_API const Color | Magenta |
| static NAZARA_CORE_API const Color | Orange |
| static NAZARA_CORE_API const Color | Red |
| static NAZARA_CORE_API const Color | Yellow |
| static NAZARA_CORE_API const Color | White |
Core class that represents a color.
|
inline |
Constructs a Color object with values.
| red | Red value |
| green | Green value |
| blue | Blue value |
| alpha | Alpha value |
|
inlineexplicit |
Constructs a Color object with a light level.
| lightness | Value for r, g and b |
|
inline |
Constructs a Color object with values.
| vec[3] | vec[0] = red value, vec[1] = green value, vec[2] = blue value |
| alpha | Alpha value |
|
inlinestatic |
Converts CMY representation to RGB.
| cyan | Cyan component |
| magenta | Magenta component |
| yellow | Yellow component |
|
inlinestatic |
Converts CMYK representation to RGB.
| cyan | Cyan component |
| magenta | Magenta component |
| yellow | Yellow component |
| black | Black component |
|
inlinestatic |
Converts HSL representation to RGB.
| hue | Hue component |
| saturation | Saturation component |
| lightness | Lightness component |
|
inlinestatic |
Converts HSV representation to RGB.
| hue | Hue component |
| saturation | Saturation component |
| value | Value component |
|
inlinestatic |
Converts XYZ representation to RGB.
| x | X component |
| y | Y component |
| z | Z component |
|
inline |
Return true is the color has no degree of transparency.
|
inline |
Checks whether the two colors are equal.
| color | Color to compare |
Multiplies two colors together.
| color | Other color |
TODO: Improve this shit
Adds two colors together.
| color | Other color |
TODO: Improve this shit
|
inline |
Checks whether the two colors are equal.
| color | Color to compare |
|
inlinestatic |
Converts RGB representation to CMYK.
| color | Color to transform |
| cyan | Cyan component |
| magenta | Magenta component |
| yellow | Yellow component |
|
inlinestatic |
Converts RGB representation to CMYK.
| color | Color to transform |
| cyan | Cyan component |
| magenta | Magenta component |
| yellow | Yellow component |
|
inlinestatic |
Converts RGB representation to HSL.
| color | Color to transform |
| hue | Hue component |
| saturation | Saturation component |
| lightness | Lightness component |
|
inlinestatic |
Converts RGB representation to HSV.
| color | Color to transform |
| hue | Hue component |
| saturation | Saturation component |
| value | Value component |
|
inline |
Converts this to string.
|
inlinestatic |
Converts RGB representation to XYZ.
| color | Color to transform |
| x | X component |
| y | Y component |
| z | Z component |