Namespace color::set
TOC
-
Description
- Set color property. To each color we can set some unique property.
Note: Calculation
- In most cases recalculation will occur e.g HSL color model has no red as component but it is possible (by design/intention of this library) to use color::set::red.
- All functions has the same signature and their accept akin values for akin type for given model.
- Generalized form:
-
template< typename < category_name >
inline void blue
(
::color::model< category_name > & color_parameter,
typename ::color::model< category_name >::component_input_const_type component_parameter
);
- Specialized:
-
template< typename tag_name >
inline void blue
(
::color::model< ::color::category:::SomeModel< tag_name > > & color_parameter
,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category:::SomeModel< tag_name > >::akin_type >::model_type component_parameter
)
- Example:
-
template< typename tag_name >
inline void blue
(
::color::model< ::color::category:::hsl< tag_name > > & color_parameter
,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category:::hsl< tag_name > >::akin_type >::model_type component_parameter
)
-
List
-
- Name
- alpha
- Declaration
- See general Note about general declaration.
- Description
- Set alpha component or do nothing if not exists.
- Example
-
// do nothing
::color::hsv < double > h{ ::color::constant::turquoise_t{} };
std::cout << ::color::set::alpha( h, 0.5 ) << std::cout;
- Name
- blue
- Declaration
- See general Note about general declaration.
- Description
- Recalculate color so ::color::get::blue will return given value.
- Example
-
::color::hsv < double > h{ ::color::constant::turquoise_t{} };
std::cout << ::color::set::blue( h, 0.5 ) << std::cout;
- Name
- gray
- Declaration
- See general Note about general declaration.
- Description
- Adjust gray-nes of color
- Example
-
::color::hsv < double > h{ ::color::constant::turquoise_t{} };
std::cout << ::color::set::gray( h, 0.5 ) << std::cout;
- Name
- green
- Declaration
- See general Note about general declaration.
- Description
- Set green of color
- Example
-
::color::hsv < double > h{ ::color::constant::turquoise_t{} };
std::cout << ::color::set::green( h, 0.5 ) << std::cout;
- Name
- hue
- Declaration
- See general Note about general declaration.
- Description
- Set hue of color.
- Example
-
::color::hsv < double > h{ ::color::constant::turquoise_t{} };
std::cout << ::color::set::rgb( h,180 ) << std::cout;
- Name
- inphase
- Declaration
- See general Note about general declaration.
- Description
- Set inphase of color.
- Example
-
::color::hsv < double > h{ ::color::constant::turquoise_t{} };
std::cout << ::color::set::inphase( h, 0 ) << std::cout;
- Name
- key
- Declaration
- See general Note about general declaration.
- Description
- Set key of color.
- Example
-
::color::hsv < double > h{ ::color::constant::turquoise_t{} };
std::cout << ::color::set::key( h,0 ) << std::cout;
- Name
- luma
- Declaration
- See general Note about general declaration.
- Description
- Set luma of color.
- Example
::color::hsv < double > h{ ::color::constant::turquoise_t{} };
std::cout << ::color::set::luma( h, 0 ) << std::cout;
- Name
- luminance
- Declaration
- See general Note about general declaration.
- Description
- Set luminance of color.
- Example
::color::hsv < double > h{ ::color::constant::turquoise_t{} };
std::cout << ::color::set::luminance( h, 0 ) << std::cout;
- Name
- quadrature
- Declaration
- See general Note about general declaration.
- Description
- Set quadrature of color.
- Example
::color::hsv < double > h{ ::color::constant::turquoise_t{} };
std::cout << ::color::set::quadrature( h, 0 ) << std::cout;
- Name
- red
- Declaration
- See general Note about general declaration.
- Description
- Set red of color.
- Example
- Example
::color::hsv < double > h{ ::color::constant::turquoise_t{} };
std::cout << ::color::set::red( h, 0 ) << std::cout;