12#ifndef SEEN_COLORS_COMPONENTS_H
13#define SEEN_COLORS_COMPONENTS_H
33 using underlying = std::underlying_type_t<Traits>;
34 return static_cast<Traits>(
static_cast<underlying
>(lhs) &
static_cast<underlying
>(rhs));
37 using underlying = std::underlying_type_t<Traits>;
38 return static_cast<Traits>(
static_cast<underlying
>(lhs) |
static_cast<underlying
>(rhs));
77 std::vector<Component>::const_iterator
begin()
const {
return std::begin(
_components); }
78 std::vector<Component>::const_iterator
end()
const {
return std::end(
_components); }
std::vector< Component >::const_iterator begin() const
Type get_wheel_type() const
Component const & operator[](const unsigned int index) const
std::vector< Component > _components
void setType(Type type, Type color_wheel=Type::NONE)
Components(Type type, Type wheel, Traits traits, std::vector< Component > components)
const std::vector< Component > & getAll() const
static Components const & get(Type type, bool alpha=false)
std::vector< Component >::const_iterator end() const
Traits operator|(const Traits lhs, const Traits rhs)
Traits operator&(const Traits lhs, const Traits rhs)
double normalize(double value) const
Clamp the value to between 0.0 and 1.0, except for hue which is wrapped around.