6#ifndef LSST_AFW_IMAGE_COLOR_H
7#define LSST_AFW_IMAGE_COLOR_H
27 : _color_value(
std::numeric_limits<
double>::quiet_NaN()),
29 _indeterminate(true) {}
33 : _color_value(color_value), _color_type(color_type), _indeterminate(
false) {}
57 if (_indeterminate && other._indeterminate) {
60 if (_indeterminate != other._indeterminate) {
63 return _color_value == other._color_value && _color_type == other._color_type;
std::string const & getColorType() const noexcept
The color type string (e.g. "g-r"); only valid if !isIndeterminate().
bool operator==(Color const &other) const noexcept
Equality comparison for colors.
~Color() noexcept=default
Color & operator=(Color const &)=default
Color(double color_value, std::string const &color_type) noexcept
Fully-specified color: both a numeric value and its type string.
Color(Color const &)=default
Color() noexcept
Default: indeterminate color.
double getColorValue() const noexcept
The numeric color value; only valid if !isIndeterminate().
bool isIndeterminate() const noexcept
Whether this Color was default‑constructed (i.e. has no value/type).
bool operator!=(Color const &other) const noexcept
Color & operator=(Color &&)=default