Sista v3.0.0-alpha.1
Sista is a C++ lightweight OS-agnostic library for terminal animations and videogames
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
sista::RGBColor Struct Reference

Represents an RGB color with red, green, and blue components in True Color (24-bit). More...

#include <ansi.hpp>

Collaboration diagram for sista::RGBColor:
Collaboration graph

Public Member Functions

 RGBColor ()
 Default constructor initializing color to black (0,0,0).
 
 RGBColor (unsigned char, unsigned char, unsigned char)
 Parameterized constructor.
 

Public Attributes

unsigned char red
 
unsigned char green
 
unsigned char blue
 

Detailed Description

Represents an RGB color with red, green, and blue components in True Color (24-bit).

This struct holds three numbers in (0-255) representing the red, green, and blue components of a color. It provides constructors for default and parameterized initialization. Default values are set to 0.

Constructor & Destructor Documentation

◆ RGBColor() [1/2]

sista::RGBColor::RGBColor ( )

Default constructor initializing color to black (0,0,0).

Blue component (0-255)

◆ RGBColor() [2/2]

sista::RGBColor::RGBColor ( unsigned char  red,
unsigned char  green,
unsigned char  blue 
)

Parameterized constructor.

Parameters
redThe red component (0-255).
greenThe green component (0-255).
blueThe blue component (0-255).

Member Data Documentation

◆ blue

unsigned char sista::RGBColor::blue

Green component (0-255)

◆ green

unsigned char sista::RGBColor::green

Red component (0-255)

◆ red

unsigned char sista::RGBColor::red

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