Turbo Engine 0.3
A C++ game engine using Allegro 5
turbo::Color Class Reference

Represent a color. More...

#include <Color.hpp>

Public Member Functions

 Color (unsigned char r, unsigned char g, unsigned char b, unsigned char a=255)
 Build a colour from red, green, blue and (optional) alpha (0-255).
 Color (unsigned char vals=255)
 Build a grey colour (all channels = vals; opaque).

Public Attributes

unsigned char r = 255
 Red value.
unsigned char g = 255
 Green value.
unsigned char b = 255
 Blue value.
unsigned char a = 255
 Alpha value.

Detailed Description

Represent a color.

Constructor & Destructor Documentation

◆ Color() [1/2]

turbo::Color::Color ( unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a = 255 )
inline

Build a colour from red, green, blue and (optional) alpha (0-255).

◆ Color() [2/2]

turbo::Color::Color ( unsigned char vals = 255)
inline

Build a grey colour (all channels = vals; opaque).

Member Data Documentation

◆ a

unsigned char turbo::Color::a = 255

Alpha value.

◆ b

unsigned char turbo::Color::b = 255

Blue value.

◆ g

unsigned char turbo::Color::g = 255

Green value.

◆ r

unsigned char turbo::Color::r = 255

Red value.


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