ROSE 0.11.145.147
Public Member Functions | List of all members
Rose::Color::RGB Class Reference

Description

Colors in RGB space.

Definition at line 134 of file Color.h.

#include <Rose/Color.h>

Public Member Functions

 RGB ()
 Default constructed color.
 
 RGB (Component r, Component g, Component b, Component a=1.0)
 Construct a color specified by components.
 
 RGB (const HSV &)
 Convert an HSV color to RGB space.
 
std::string toHtml () const
 Convert to HTML string.
 
std::string toAnsi (Layer) const
 Convert to ANSI color escape.
 
Component r () const
 Component of color.
 
Component g () const
 Component of color.
 
Component b () const
 Component of color.
 
Component a () const
 Component of color.
 
Component red () const
 Component of color.
 
Component green () const
 Component of color.
 
Component blue () const
 Component of color.
 
Component alpha () const
 Component of color.
 

Constructor & Destructor Documentation

◆ RGB() [1/2]

Rose::Color::RGB::RGB ( )
inline

Default constructed color.

Default constructed colors are useful when a color is stored in a container, but should not generally be used otherwise. Therefore, a default constructed color will be bright red as a warning.

Definition at line 142 of file Color.h.

◆ RGB() [2/2]

Rose::Color::RGB::RGB ( Component  r,
Component  g,
Component  b,
Component  a = 1.0 
)
inline

Construct a color specified by components.

The components should be each be between 0 and 1. Values outside the domain are clipped.

Definition at line 147 of file Color.h.

References Rose::Color::clip().

Member Function Documentation

◆ r()

Component Rose::Color::RGB::r ( ) const
inline

Component of color.

RGB components are named red, green, blue, and alpha (or just the first letter of each).

Each component is a floating-point value between zero and one.

Definition at line 159 of file Color.h.

◆ g()

Component Rose::Color::RGB::g ( ) const
inline

Component of color.

RGB components are named red, green, blue, and alpha (or just the first letter of each).

Each component is a floating-point value between zero and one.

Definition at line 160 of file Color.h.

◆ b()

Component Rose::Color::RGB::b ( ) const
inline

Component of color.

RGB components are named red, green, blue, and alpha (or just the first letter of each).

Each component is a floating-point value between zero and one.

Definition at line 161 of file Color.h.

◆ a()

Component Rose::Color::RGB::a ( ) const
inline

Component of color.

RGB components are named red, green, blue, and alpha (or just the first letter of each).

Each component is a floating-point value between zero and one.

Definition at line 162 of file Color.h.

◆ red()

Component Rose::Color::RGB::red ( ) const
inline

Component of color.

RGB components are named red, green, blue, and alpha (or just the first letter of each).

Each component is a floating-point value between zero and one.

Definition at line 163 of file Color.h.

◆ green()

Component Rose::Color::RGB::green ( ) const
inline

Component of color.

RGB components are named red, green, blue, and alpha (or just the first letter of each).

Each component is a floating-point value between zero and one.

Definition at line 164 of file Color.h.

◆ blue()

Component Rose::Color::RGB::blue ( ) const
inline

Component of color.

RGB components are named red, green, blue, and alpha (or just the first letter of each).

Each component is a floating-point value between zero and one.

Definition at line 165 of file Color.h.

◆ alpha()

Component Rose::Color::RGB::alpha ( ) const
inline

Component of color.

RGB components are named red, green, blue, and alpha (or just the first letter of each).

Each component is a floating-point value between zero and one.

Definition at line 166 of file Color.h.


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