xlnt
|
Colors can be applied to many parts of a cell's style. More...
#include <color.hpp>
Public Member Functions | |
color () | |
Constructs a default color More... | |
color (const rgb_color &rgb) | |
Constructs a color from a given RGB color More... | |
color (const indexed_color &indexed) | |
Constructs a color from a given indexed color More... | |
color (const theme_color &theme) | |
Constructs a color from a given theme color More... | |
color_type | type () const |
Returns the type of this color More... | |
bool | auto_ () const |
Returns true if this color has been set to auto More... | |
void | auto_ (bool value) |
Sets the auto property of this color to value More... | |
const rgb_color & | rgb () const |
Returns the internal indexed color representing this color. If this is not an RGB color, an invalid_attribute exception will be thrown. More... | |
rgb_color & | rgb () |
Returns the internal indexed color representing this color. If this is not an RGB color, an invalid_attribute exception will be thrown. More... | |
const indexed_color & | indexed () const |
Returns the internal indexed color representing this color. If this is not an indexed color, an invalid_attribute exception will be thrown. More... | |
indexed_color & | indexed () |
Returns the internal indexed color representing this color. If this is not an indexed color, an invalid_attribute exception will be thrown. More... | |
const theme_color & | theme () const |
Returns the internal indexed color representing this color. If this is not a theme color, an invalid_attribute exception will be thrown. More... | |
theme_color & | theme () |
Returns the internal indexed color representing this color. If this is not a theme color, an invalid_attribute exception will be thrown. More... | |
bool | has_tint () const |
Returns true if tint is set More... | |
double | tint () const |
Returns the tint of this color. More... | |
void | tint (double tint) |
Sets the tint of this color to tint. Tints lighten or darken an existing color by multiplying the color with the tint. More... | |
bool | operator== (const color &other) const |
Returns true if this color is equivalent to other More... | |
bool | operator!= (const color &other) const |
Returns true if this color is not equivalent to other More... | |
Static Public Member Functions | |
static const color | black () |
Returns the color #000000 More... | |
static const color | white () |
Returns the color #ffffff More... | |
static const color | red () |
Returns the color #ff0000 More... | |
static const color | darkred () |
Returns the color #8b0000 More... | |
static const color | blue () |
Returns the color #00ff00 More... | |
static const color | darkblue () |
Returns the color #008b00 More... | |
static const color | green () |
Returns the color #0000ff More... | |
static const color | darkgreen () |
Returns the color #00008b More... | |
static const color | yellow () |
Returns the color #ffff00 More... | |
static const color | darkyellow () |
Returns the color #cccc00 More... | |
Colors can be applied to many parts of a cell's style.
xlnt::color::color | ( | ) |
Constructs a default color
xlnt::color::color | ( | const rgb_color & | rgb | ) |
Constructs a color from a given RGB color
xlnt::color::color | ( | const indexed_color & | indexed | ) |
Constructs a color from a given indexed color
xlnt::color::color | ( | const theme_color & | theme | ) |
Constructs a color from a given theme color
bool xlnt::color::auto_ | ( | ) | const |
Returns true if this color has been set to auto
void xlnt::color::auto_ | ( | bool | value | ) |
Sets the auto property of this color to value
|
static |
Returns the color #000000
|
static |
Returns the color #00ff00
|
static |
Returns the color #008b00
|
static |
Returns the color #00008b
|
static |
Returns the color #8b0000
|
static |
Returns the color #cccc00
|
static |
Returns the color #0000ff
bool xlnt::color::has_tint | ( | ) | const |
Returns true if tint is set
const indexed_color& xlnt::color::indexed | ( | ) | const |
Returns the internal indexed color representing this color. If this is not an indexed color, an invalid_attribute exception will be thrown.
indexed_color& xlnt::color::indexed | ( | ) |
Returns the internal indexed color representing this color. If this is not an indexed color, an invalid_attribute exception will be thrown.
bool xlnt::color::operator!= | ( | const color & | other | ) | const |
Returns true if this color is not equivalent to other
bool xlnt::color::operator== | ( | const color & | other | ) | const |
Returns true if this color is equivalent to other
|
static |
Returns the color #ff0000
const rgb_color& xlnt::color::rgb | ( | ) | const |
Returns the internal indexed color representing this color. If this is not an RGB color, an invalid_attribute exception will be thrown.
rgb_color& xlnt::color::rgb | ( | ) |
Returns the internal indexed color representing this color. If this is not an RGB color, an invalid_attribute exception will be thrown.
const theme_color& xlnt::color::theme | ( | ) | const |
Returns the internal indexed color representing this color. If this is not a theme color, an invalid_attribute exception will be thrown.
theme_color& xlnt::color::theme | ( | ) |
Returns the internal indexed color representing this color. If this is not a theme color, an invalid_attribute exception will be thrown.
double xlnt::color::tint | ( | ) | const |
Returns the tint of this color.
void xlnt::color::tint | ( | double | tint | ) |
Sets the tint of this color to tint. Tints lighten or darken an existing color by multiplying the color with the tint.
color_type xlnt::color::type | ( | ) | const |
Returns the type of this color
|
static |
Returns the color #ffffff
|
static |
Returns the color #ffff00