C++ library thats implemets class color. Available models: RGB, HSL, HSV, CMY, CMYK, YIQ, YUV and growing.
C++ library thats implemets class color. Available models: RGB, HSL, HSV, CMY, CMYK, YIQ, YUV and growing.
// Initialize with constant.
color::bgr b( ::color::constant::aqua_t{} );
//! y( ::color::constant::x11::green_t{} );
// Use intuitive/natural values for initialization.
// hue goes from 0 to 360, saturation and value from 0 to 100.
color::hsv h( { 120.0, 50.0, 60.0 } );
// Lightens will goes from 0 to 100. a and b from -127 to 127.
color::lab l( { 50.0, -10, 90 } );
// Well known rgb. Values are between 0 and 1.
color::rgb r( { 0.5, 0, 0.9 } );// any model/format to any model/format by use of operator=
b = r; //! to hsv
h = y; //! to hsv
l = y; //! to labcolor::rgb r = ::color::constant::aqua_t{};
::color::get::red( r ); //! y = ::color::constant::orange_t{};
::color::get::red( y ); //! r0 = aqua_t{};
rgb r1 = turquoise_t{};
yiq y = orange_t{};
cout ( r0, r1 ) ( r0, y ) ( r0, y ) ( r0, y ) ( r0, y ) ( r0, y, 1, 2 ) ( r0, r1 ) y1 = ::color::constant::turquoise_t{};
color::yiq y2 = ::color::constant::orange_t{};
color::yiq yr;
::color::operation::blend( y1, 0.1, y2 ); //!< Blend two colors for given alpha. Accumulation style.
yr = color::operation::mix( y2, 0.5, y2 ); //!< Blend two colors for given alpha. return style.Licensed under an Apache-2.0 license.
No open issues yet, or sync has not completed.