Class for representing color values.
More...
#include <color.h>
|
typedef Eigen::Vector3f | Base |
|
|
| Color (void) |
| Empty constructor. More...
|
|
| Color (Eigen::Index rows, Eigen::Index cols) |
| Needed for pybind. More...
|
|
template<typename OtherDerived > |
| Color (const Eigen::MatrixBase< OtherDerived > &other) |
| Constructor which allows construction of Colors from Eigen expressions. More...
|
|
template<typename OtherDerived > |
Color & | operator= (const Eigen::MatrixBase< OtherDerived > &other) |
| Constructor which allows Eigen assignments to Color. More...
|
|
| Color (const Scalar &red, const Scalar &green, const Scalar &blue) |
| Constructor. More...
|
|
std::string | to_html_hex () const |
| Convert the color to an HTML hex color string. More...
|
|
Scalar | r () const |
| The red value [0,1]. More...
|
|
Scalar | g () const |
| The green value [0,1]. More...
|
|
Scalar | b () const |
| The blue value [0,1]. More...
|
|
std::uint8_t | R () const |
| The red value [0,255]. More...
|
|
std::uint8_t | G () const |
| The green value [0,255]. More...
|
|
std::uint8_t | B () const |
| The blue value [0,255]. More...
|
|
Scalar & | r () |
| Reference to the red value [0,1]. More...
|
|
Scalar & | g () |
| Reference to the green value [0,1]. More...
|
|
Scalar & | b () |
| Reference to the blue value [0,1]. More...
|
|
std::string | to_string () const |
| Represent the color as a string. More...
|
|
bool | is_none () const |
| Whether this is a "no color" instance. More...
|
|
|
static Color | from_bytes (std::uint8_t red, std::uint8_t green, std::uint8_t blue) |
| Construct a color object from byte values. More...
|
|
static const Color | None () |
| Constant value indicating "no color". More...
|
|
Class for representing color values.
◆ Base
◆ Color() [1/4]
scenepic::Color::Color |
( |
void |
| ) |
|
|
inline |
◆ Color() [2/4]
scenepic::Color::Color |
( |
Eigen::Index |
rows, |
|
|
Eigen::Index |
cols |
|
) |
| |
|
inline |
◆ Color() [3/4]
template<typename OtherDerived >
scenepic::Color::Color |
( |
const Eigen::MatrixBase< OtherDerived > & |
other | ) |
|
|
inline |
Constructor which allows construction of Colors from Eigen expressions.
◆ Color() [4/4]
scenepic::Color::Color |
( |
const Scalar & |
red, |
|
|
const Scalar & |
green, |
|
|
const Scalar & |
blue |
|
) |
| |
Constructor.
- Parameters
-
red | Red channel [0,1] |
green | Green channel [0,1] |
blue | Blue channel [0,1] |
◆ b() [1/2]
Scalar & scenepic::Color::b |
( |
| ) |
|
Reference to the blue value [0,1].
◆ b() [2/2]
Scalar scenepic::Color::b |
( |
| ) |
const |
◆ B()
std::uint8_t scenepic::Color::B |
( |
| ) |
const |
◆ from_bytes()
static Color scenepic::Color::from_bytes |
( |
std::uint8_t |
red, |
|
|
std::uint8_t |
green, |
|
|
std::uint8_t |
blue |
|
) |
| |
|
static |
Construct a color object from byte values.
- Parameters
-
red | Red channel |
green | Green channel |
blue | Blue channel |
- Returns
- a valid color object
◆ g() [1/2]
Scalar & scenepic::Color::g |
( |
| ) |
|
Reference to the green value [0,1].
◆ g() [2/2]
Scalar scenepic::Color::g |
( |
| ) |
const |
◆ G()
std::uint8_t scenepic::Color::G |
( |
| ) |
const |
◆ is_none()
bool scenepic::Color::is_none |
( |
| ) |
const |
Whether this is a "no color" instance.
◆ None()
static const Color scenepic::Color::None |
( |
| ) |
|
|
static |
Constant value indicating "no color".
◆ operator=()
template<typename OtherDerived >
Color & scenepic::Color::operator= |
( |
const Eigen::MatrixBase< OtherDerived > & |
other | ) |
|
|
inline |
Constructor which allows Eigen assignments to Color.
◆ r() [1/2]
Scalar & scenepic::Color::r |
( |
| ) |
|
Reference to the red value [0,1].
◆ r() [2/2]
Scalar scenepic::Color::r |
( |
| ) |
const |
◆ R()
std::uint8_t scenepic::Color::R |
( |
| ) |
const |
◆ to_html_hex()
std::string scenepic::Color::to_html_hex |
( |
| ) |
const |
Convert the color to an HTML hex color string.
◆ to_string()
std::string scenepic::Color::to_string |
( |
| ) |
const |
Represent the color as a string.
The documentation for this class was generated from the following file: