| 
    nCine 2025.10.r510-151873a
    
   A cross-platform 2D game engine 
   | 
 
A four channels normalized float color. More...
#include <Colorf.h>

Public Member Functions | |
| Colorf () | |
| Default constructor (white color)  | |
| Colorf (float red, float green, float blue) | |
| Three channels constructor.  | |
| Colorf (float red, float green, float blue, float alpha) | |
| Four channels constructor.  | |
| Colorf (const float channels[NumChannels]) | |
| Four channels constructor from an array.  | |
| Colorf (const Color &color) | |
| Constructor taking an unsigned char color.  | |
| Colorf (const ColorHdr &color) | |
| Constructor taking an unclamped float color.  | |
| float | r () const | 
| Gets the red channel of the color.  | |
| float | g () const | 
| Gets the green channel of the color.  | |
| float | b () const | 
| Gets the blue channel of the color.  | |
| float | a () const | 
| Gets the alpha channel of the color.  | |
| const float * | data () const | 
| Gets the color array.  | |
| float * | data () | 
| Gets the color array.  | |
| void | set (float red, float green, float blue, float alpha) | 
| Sets four color channels.  | |
| void | set (float red, float green, float blue) | 
| Sets three color channels.  | |
| void | setVec (const float channels[NumChannels]) | 
| Sets four color channels from an array.  | |
| void | setAlpha (float alpha) | 
| Sets the alpha channel.  | |
| Colorf & | operator= (const Color &color) | 
| Assignment operator from an unsigned char color.  | |
| Colorf & | operator+= (const Colorf &v) | 
| Colorf & | operator-= (const Colorf &v) | 
| Colorf & | operator*= (const Colorf &color) | 
| Colorf & | operator*= (float scalar) | 
| Multiplication by a constant scalar.  | |
| Colorf | operator+ (const Colorf &color) const | 
| Colorf | operator- (const Colorf &color) const | 
| Colorf | operator* (const Colorf &color) const | 
| Colorf | operator* (float scalar) const | 
| Multiplication by a constant scalar.  | |
Static Public Attributes | |
| static const int | NumChannels = 4 | 
| static const Colorf | Black | 
| static const Colorf | White | 
| static const Colorf | Red | 
| static const Colorf | Green | 
| static const Colorf | Blue | 
| static const Colorf | Yellow | 
| static const Colorf | Magenta | 
| static const Colorf | Cyan | 
A four channels normalized float color.