TGUI  0.7.8
tgui::Color Class Reference

Implicit converter for colors. More...

#include <TGUI/Color.hpp>

Public Member Functions

 Color (const sf::Color &color)
 Create the object from an sf::Color. More...
 
 Color (sf::Uint8 red, sf::Uint8 green, sf::Uint8 blue, sf::Uint8 alpha=255)
 Create the object from an the RGB or RGBA values. More...
 
 Color (const char *string)
 Create the object from a string. More...
 
 Color (const std::string &string)
 Create the object from a string. More...
 
 operator sf::Color () const
 Convert this object into an sf::Color object. More...
 

Detailed Description

Implicit converter for colors.

Constructor & Destructor Documentation

◆ Color() [1/4]

tgui::Color::Color ( const sf::Color &  color)

Create the object from an sf::Color.

Parameters
colorColor to copy

◆ Color() [2/4]

tgui::Color::Color ( sf::Uint8  red,
sf::Uint8  green,
sf::Uint8  blue,
sf::Uint8  alpha = 255 
)

Create the object from an the RGB or RGBA values.

Parameters
redRed component
greenGreen component
blueBlue component
alphaAlpha component

◆ Color() [3/4]

tgui::Color::Color ( const char *  string)

Create the object from a string.

Parameters
stringString to be deserialized as color

The Deserializer class is used to convert the string into a color.

◆ Color() [4/4]

tgui::Color::Color ( const std::string &  string)

Create the object from a string.

Parameters
stringString to be deserialized as color

The Deserializer class is used to convert the string into a color.

Member Function Documentation

◆ operator sf::Color()

tgui::Color::operator sf::Color ( ) const

Convert this object into an sf::Color object.

Returns
The color stored in this object

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