Namespace color::constant
TOC
-
x11,
generic,
gray,
lab,
lms,
YPbPr,
yiq,
yuv,
xyz,
hue,
aqua, aquamarine, azure, beige
bisque, black, blue, brown
chocolate, coral, crimson, cyan
fuchsia, gainsboro, gold, gray
green, indigo, ivory, khaki
lavender, lime, linen, magenta
maroon,
moccasin, navy, olive, orange
orchid, peru, pink, plum
purple, red, salmon, sienna
silver, snow, tan, teal
thistle, tomato, turquoise, violet
wheat, white, yellow
Description
- Contain constants and types to makes instancing easy.
Note
- All names will produce values noted at : http://www.w3.org/TR/css3-color
List
-
x11
-
- Description
- Constant specific items for X11.
- Type
- namespace.
- Example
-
::color::rgb<double> r{ ::color::contant::x11::gray_t{} };
- Link
- x11
generic
-
- Description
- General constants.
- Type
- template structure.
- Example
-
typedef ::color::constant::generic< ::color::rgb<double>::cartegory_type >> generic_t;
std::cout << generic_t::zero() << std::endl //!< will print number zero
std::cout << generic_t::pi() << std::endl //!< will print number pi
- Note
- Simple constants zero, one and two. All types of corresponding scalar.
gray
-
- Description
- Constants used by gray model.
- Example
TODO
- Note
- Currently it is constant for conversion from RGB.
lab
-
- Description:
- Constants used by LAB model.
- Type:
- namespace
- Member(s):
enum reference_enum
{
CIE_entity,
Hunter_entity,
};
- Example:
-
::color::lab< double, ::color::constant::lab::CIE_entity > c0;
::color::lab< float, ::color::constant::lab::Hunter_entity > c1;
c0 = c1;
c1 = c0;
lms
-
- Description:
- Constants used by LMS model.
- Type:
- namespace
- Member(s):
enum reference_enum
{
von_Kries_D65_entity,
von_Kries_E_entity,
BFD_entity,
MCAT02_entity,
};
- Example:
-
::color::lms< double, ::color::constant::lms::von_Kries_D65_entity > c0;
::color::lms< double, ::color::constant::lms::von_Kries_E_entity > c1;
::color::lms< double, ::color::constant::lms::BFD_entity > c2;
::color::lms< double, ::color::constant::lms::MCAT02_entity > c3;
c0 = c1; c0 = c2; c0 = c3;
c1 = c0; c1 = c2; c1 = c3;
c2 = c0; c2 = c1; c2 = c3;
c3 = c0; c3 = c1; c3 = c2;
YPbPr
-
- Description:
- Constants used by YPbPr model.
- Type:
- namespace
- Member(s):
enum reference_enum
{
BT_601_entity
BT_709_entity
BT_2020_entity
};
- Example:
-
::color::YPbPr< double, ::color::constant::YPbPr:: BT_601_entity > c0;
::color::YPbPr< double, ::color::constant::YPbPr:: BT_709_entity > c1;
::color::YPbPr< double, ::color::constant::YPbPr:: BT_2020_entity > c2;
c0 = c1; c0 = c2;
c1 = c0; c1 = c2;
c2 = c0; c2 = c1;
xyz
-
- Description
- Constants used by XYZ model.
- Type
- namespace
- Example
TODO
- Note
- TODO.
yiq
-
- Description
- Constants used by YIQ model.
- Type
- namespace
- Example
TODO
- Note
- Convert from to RGB. Bounds for inphase and quadrature.
yuv
-
- Description:
- Constants used by YUV model.
- Type:
- namespace
- Member(s):
enum reference_enum
{
BT_601_entity,
BT_709_entity
};
- Example:
-
::color::yuv< double, ::color::constant::yuv::BT_601_entity > c0;
::color::yuv< double, ::color::constant::yuv::BT_709_entity > c1;
c0 = c1;
c1 = c0;
hue
-
- Description
- Enumerator and enumerants to chose formula to calculate hue from rgb model.
- Type
- namespace
- List
-
error_entity- Error entity.
hexagon_entity- Use Preucil formula to calculate hue from given rgb.
polar_atan2_entity- Use Evans, Hanson, and Brewer formula, variant that use atan2.
polar_acos_entity- Use Evans, Hanson, and Brewer formula, variant that use acos.
polar_entity- Use Evans, Hanson, and Brewer formula, currently equal to polar_atan2_entity.
- Example
-
::color::rgb< double > r{ ::color::contant::aqua_t{} };
::color::get::hue( r ); // Use default formula. Defualt is hexagon_entity
::color::get::hue<::color::constant::hue::polar_entity >( r ); // Use default polar formula. Equal to polar_atan2_entity
::color::get::hue<::color::constant::hue::polar_atan2_entity >( r ); // Use Evans, Hanson, and Brewer.
::color::get::hue<::color::constant::hue::polar_acos_entity >( r ); // Use Evans, Hanson, and Brewer.
::color::get::hue<::color::constant::hue::hexagon_entity >( r ); // Use Preucil formula.
- Note
- This operation works only on RGB model.
- See
- hue in get
-
aqua_t, aqua_t
-
- Description
- Types to construct aqua color.
- Example
::color::rgb<double> r{ ::color::contant::aqua_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
aquamarine_t, aquamarine_t
-
- Description
- Types to construct aquamarine color.
- Example
::color::rgb<double> r{ ::color::contant::aquamarine_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
azure_t, azure_t
-
- Description
- Types to construct azure color.
- Example
::color::rgb<double> r{ ::color::contant::azure_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
beige_t,beige_t
-
- Description
- Types to construct beige color.
- Example
::color::rgb<double> r{ ::color::contant::beige_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
bisque_t
-
- Description
- Types to construct bisque color.
- Example
::color::rgb<double> r{ ::color::contant::bisque_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
black_t
-
- Description
- Types to construct black color.
- Example
::color::rgb<double> r{ ::color::contant::black_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
blue_t
-
- Description
- Types to construct blue color.
- Example
::color::rgb<double> r{ ::color::contant::blue_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
brown_t
-
- Description
- Types to construct brown color.
- Example
::color::rgb<double> r{ ::color::contant::brown_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
chocolate_t
-
- Description
- Types to construct chocolate color.
- Example
::color::rgb<double> r{ ::color::contant::chocolate_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
coral_t
-
- Description
- Types to construct coral color.
- Example
::color::rgb<double> r{ ::color::contant::coral_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
crimson_t
-
- Description
- Types to construct crimson color.
- Example
::color::rgb<double> r{ ::color::contant::crimson_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
cyan_t
-
- Description
- Types to construct cyan color.
- Example
::color::rgb<double> r{ ::color::contant::cyan_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
fuchsia_t
-
- Description
- Types to construct fuchsia color.
- Example
::color::rgb<double> r{ ::color::contant::fuchsia_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
gainsboro_t
-
- Description
- Types to construct gainsboro color.
- Example
::color::rgb<double> r{ ::color::contant::gainsboro_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
gold_t
-
- Description
- Types to construct gold color.
- Example
::color::rgb<double> r{ ::color::contant::gold_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
template < uint black, uint white > struct gray_t;
-
- Description
- Types to construct gray from given ration betwen black and white color.
- Example
-
1 for black, 2 for white. Total weight i 1+2=3. 1/3 is black part. 2/3 is white part. As result we have 66.666...% of gray.
::color::rgb<double> r{ ::color::contant::gray_t<1,2>{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
green_t
-
- Description
- Types to construct green color.
- Example
::color::rgb<double> r{ ::color::contant::green_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
indigo_t
-
- Description
- Types to construct indigo color.
- Example
::color::rgb<double> r{ ::color::contant::indigo_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
ivory_t
-
- Description
- Types to construct ivory color.
- Example
::color::rgb<double> r{ ::color::contant::ivory_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
khaki_t
-
- Description
- Types to construct khaki color.
- Example
::color::rgb<double> r{ ::color::contant::khaki_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
lavender_t
-
- Description
- Types to construct lavender color.
- Example
::color::rgb<double> r{ ::color::contant::lavender_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
lime_t
-
- Description
- Types to construct lime color.
- Example
::color::rgb<double> r{ ::color::contant::lime_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
linen_t
-
- Description
- Types to construct linen color.
- Example
::color::rgb<double> r{ ::color::contant::linen_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
magenta_t
-
- Description
- Types to construct magenta color.
- Example
::color::rgb<double> r{ ::color::contant::magenta_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
maroon_t
-
- Description
- Types to construct maroon color.
- Example
::color::rgb<double> r{ ::color::contant::maroon_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
moccasin_t
-
- Description
- Types to construct moccasin color.
- Example
::color::rgb<double> r{ ::color::contant::moccasin_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
navy_t,navy_t
-
- Description
- Types to construct navy color.
- Example
::color::rgb<double> r{ ::color::contant::navy_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
olive_t
-
- Description
- Types to construct olive color.
- Example
::color::rgb<double> r{ ::color::contant::olive_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
orange_t
-
- Description
- Types to construct orange color.
- Example
::color::rgb<double> r{ ::color::contant::orange_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
orchid_t
-
- Description
- Types to construct orchid color.
- Example
::color::rgb<double> r{ ::color::contant::orchid_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
peru_t
-
- Description
- Types to construct peru color.
- Example
::color::rgb<double> r{ ::color::contant::peru_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
pink_t
-
- Description
- Types to construct pink color.
- Example
::color::rgb<double> r{ ::color::contant::pink_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
plum_t
-
- Description
- Types to construct plum color.
- Example
::color::rgb<double> r{ ::color::contant::plum_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
purple_t
-
- Description
- Types to construct purple color.
- Example
::color::rgb<double> r{ ::color::contant::purple_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
red_t
-
- Description
- Types to construct red color.
- Example
::color::rgb<double> r{ ::color::contant::red_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
salmon_t
-
- Description
- Types to construct salmon color.
- Example
::color::rgb<double> r{ ::color::contant::salmon_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
sienna_t
-
- Description
- Types to construct sienna color.
- Example
::color::rgb<double> r{ ::color::contant::sienna_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
silver_t
-
- Description
- Types to construct silver color.
- Example
::color::rgb<double> r{ ::color::contant::silver_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
snow_t
-
- Description
- Types to construct snow color.
- Example
::color::rgb<double> r{ ::color::contant::snow_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
tan_t
-
- Description
- Types to construct tan color.
- Example
::color::rgb<double> r{ ::color::contant::tan_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
teal_t
-
- Description
- Types to construct teal color.
- Example
::color::rgb<double> r{ ::color::contant::teal_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
thistle_t
-
- Description
- Types to construct thistle color.
- Example
::color::rgb<double> r{ ::color::contant::thistle_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
tomato_t
-
- Description
- Types to construct tomato color.
- Example
::color::rgb<double> r{ ::color::contant::tomato_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
turquoise_t
-
- Description
- Types to construct turquoise color.
- Example
::color::rgb<double> r{ ::color::contant::turquoise_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
violet_t
-
- Description
- Types to construct violet color.
- Example
::color::rgb<double> r{ ::color::contant::violet_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
wheat_t
-
- Description
- Types to construct wheat color.
- Example
::color::rgb<double> r{ ::color::contant::wheat_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
white_t
-
- Description
- Types to construct white color.
- Example
::color::rgb<double> r{ ::color::contant::white_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.
-
yellow_t
-
- Description
- Types to construct yellow color.
- Example
::color::rgb<double> r{ ::color::contant::yellow_t{} };
- Note
- This is just type. No additional memory are consumed or additional calculation involved.