class ConfigVariableColor

Bases: ConfigVariable

This is a convenience class to specialize ConfigVariable as a set of floating-point types representing a color value.

It interprets the color differently depending on how many words were specified: if only one, it is interpreted as a shade of gray with alpha 1. If two values were specified, a grayscale and alpha pair. If three, a set of R, G, B values with alpha 1, and if four, a complete RGBA color.

This isn’t defined in dtool because it relies on the LColor class, which is defined in linmath.

Inheritance diagram

Inheritance diagram of ConfigVariableColor

ConfigVariableColor(std::string const &name)
ConfigVariableColor(std::string const &name, LColor const &default_value, std::string const &description = string(), int flags = 0)
ConfigVariableColor(std::string const &name, std::string const &default_value, std::string const &description = string(), int flags = 0)
ConfigVariableColor(ConfigVariableColor const&) = default
LColor get_default_value(void) const

Returns the variable’s default value.

LColor const &get_value(void) const

Returns the variable’s value.

void set_value(LColor const &value)

Reassigns the variable’s local value.