![]() |
LibCarna Version 3.4.0
|
Represents a color. Objects from this class are copyable and assignable. More...
#include <Color.hpp>
Collaboration diagram for LibCarna::base::Color:Public Member Functions | |
| Color (const math::Vector4f &) | |
| Instantiates from floating point values, clamped to interval \(\left[0, 1\right]\). | |
| Color (unsigned char r, unsigned char g, unsigned char b, unsigned char a) | |
| Instantiates. | |
| Color () | |
| Instantiates with BLACK_NO_ALPHA. | |
| operator math::Vector4f () const | |
| Converts to floating point representation with values in interval \(\left[0, 1\right]\). | |
| bool | operator== (const Color &other) const |
| Compares to other. | |
| bool | operator< (const Color &other) const |
| Compares to other. | |
| Color & | operator= (const Color &other) |
| Assigns values from other. | |
Public Attributes | |
| unsigned char | r |
| Holds the red component. | |
| unsigned char | g |
| Holds the green component. | |
| unsigned char | b |
| Holds the blue component. | |
| unsigned char | a |
| Holds the alpha component. | |
Static Public Attributes | |
| static const Color | WHITE |
Holds Color(255, 255, 255, 255). | |
| static const Color | WHITE_NO_ALPHA |
Holds Color(255, 255, 255, 0). | |
| static const Color | BLACK |
Holds Color(0, 0, 0, 255). | |
| static const Color | BLACK_NO_ALPHA |
Holds Color(0, 0, 0, 0). | |
| static const Color | RED |
Holds Color(255, 0, 0, 255). | |
| static const Color | RED_NO_ALPHA |
Holds Color(255, 0, 0, 0). | |
| static const Color | GREEN |
Holds Color(0, 255, 0, 255). | |
| static const Color | GREEN_NO_ALPHA |
Holds Color(0, 255, 0, 0). | |
| static const Color | BLUE |
Holds Color(0, 0, 255, 255). | |
| static const Color | BLUE_NO_ALPHA |
Holds Color(0, 0, 255, 0). | |
Represents a color. Objects from this class are copyable and assignable.
Written by Leonid Kostrykin © 2021–2025. Based on Carna (© 2010-2016).
Documentation generated by Doxygen