Color¶
- class
A RGB color representation, generic for display devices.
This class implements a 16-bit RGB 5-6-5 color model. It support methods for calculating color blendings and more.
The class definition also define a set of global constant predefined colors, like white, red, green, blue and black. Further, it includes a set of the FlatUI colors that Mono uses:
- Clouds
- WetAsphalt
- Concrete
- Silver
- Asbestos
- BelizeHole
- MidnightBlue
- Alizarin
- Turquoise
- Emerald
Public Functions
-
Color::
Color
()¶ MARK: Constructors.
MARK: Public contructors.
-
uint8_t
Color::
Red
() const¶ MARK: Getters.
Return 8-bit red color component
-
uint8_t
Color::
Green
() const¶ Return 8-bit green color component
-
uint8_t
Color::
Blue
() const¶ Return 8-bit blue color component
-
Color
Color::
scale
(uint8_t factor) const¶ Misc.
Multiply each RGB channel by a factor from 0-255
- Return
- the scaled color
-
Color
Color::
blendMultiply
(Color other) const¶ Return the product of two colors
- Return
- the multiply blended color
-
Color
Color::
blendAdditive
(Color other) const¶ Add this color with another
-
Color
Color::
invert
() const¶ Return the inverse
-
uint8_t *
Color::
BytePointer
()¶ MARK: Misc.
-
mono::String
Color::
toString
() const¶ Get a human readable string representatio of the color.
Returns a string of the form: (RR, GG, BB)
- Return
- a color string
-
uint16_t
Color::
operator=
(Color col)¶ MARK: Operator overloads.