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>

Public Member Functions

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

Public Attributes

unsigned short int red
 
unsigned short int green
 
unsigned short int blue
 

Detailed Description

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

This struct holds three unsigned short integers 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 short int  red,
unsigned short int  green,
unsigned short int  blue 
)

Parameterized constructor.

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

Member Data Documentation

◆ blue

unsigned short int sista::RGBColor::blue

Green component (0-255)

◆ green

unsigned short int sista::RGBColor::green

Red component (0-255)

◆ red

unsigned short int sista::RGBColor::red

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