Hummingbird Framework
 All Classes Functions Variables Modules Pages
hb::Color Struct Reference

A color represented in the RGBA format. More...

#include <Color.h>

Public Member Functions

 Color ()
 Default constructor. Initializes to color black.
 
 Color (float r, float g, float b, float a=1.0f)
 Floats contructor. More...
 
 Color (int r, int g, int b, int a=255)
 Int contructor. More...
 

Public Attributes

float r
 Red component of the color.
 
float g
 Green component of the color.
 
float b
 Blue component of the color.
 
float a
 Alpha component of the color (its opacity)
 

Detailed Description

A color represented in the RGBA format.

The values of its components should be between 0.0 and 1.0.

Constructor & Destructor Documentation

hb::Color::Color ( float  r,
float  g,
float  b,
float  a = 1.0f 
)
inline

Floats contructor.

Parameters
rRed component of the color
gGreen component of the color
bBlue component of the color
a(optional) Alpha component of the color (its opacity).
hb::Color::Color ( int  r,
int  g,
int  b,
int  a = 255 
)
inline

Int contructor.

Parameters
rRed component of the color
gGreen component of the color
bBlue component of the color
a(optional) Alpha component of the color (its opacity).

Values should be between 0 and 255. They will be divided by 255.0f.


The documentation for this struct was generated from the following file: