izzi
SVG SUBSET C++ API
Loading...
Searching...
No Matches
svg::color_qf Struct Reference

#include <a60-svg-color.h>

Public Types

using ftype = float

Public Member Functions

 color_qf ()=default
 Value between 0.0 (black) and 1.0.
 color_qf (const color_qf &)=default
color_qfoperator= (const color_qf &)=default
 color_qf (ftype vh, ftype vs, ftype vv)
 color_qf (const color_qi &cqi)
 color_qf (const color e)
color_qi to_color_qi () const
 Back to RGB https://www.rapidtables.com/convert/color/hsv-to-rgb.html.
color_qf rgb_to_hsv (const color_qi &rgb) const
 Convert RGB to HSV.
color_qi hsv_to_rgb (const color_qf &hsv) const
 Convert HSV to RGB.
color_qi tint_perceptual (const uint n)
 Interpolated tinting algorithm from palette (ciecam16j70_palette).
color_qi tint_percentage (const double tp, const double rmin=0, const double rmax=100)
 Procedural tinting algorithm.

Static Public Member Functions

static string to_string (color_qf s)

Public Attributes

ftype h
ftype s
 Hue degree between 0.0 and 360.0.
ftype v
 Saturation between 0.0 (gray) and 1.0.

Detailed Description

Color quantified as floating point HSV components in the range [0,1].

https://web.archive.org/web/20150303174723/ http://en.literateprograms.org/RGB_to_HSV_color_space_conversion_(C)

Definition at line 546 of file a60-svg-color.h.

Member Typedef Documentation

◆ ftype

using svg::color_qf::ftype = float

Definition at line 548 of file a60-svg-color.h.

Constructor & Destructor Documentation

◆ color_qf() [1/5]

svg::color_qf::color_qf ( )
default

Value between 0.0 (black) and 1.0.

◆ color_qf() [2/5]

svg::color_qf::color_qf ( const color_qf & )
default
Here is the call graph for this function:

◆ color_qf() [3/5]

svg::color_qf::color_qf ( ftype vh,
ftype vs,
ftype vv )
inline

Definition at line 560 of file a60-svg-color.h.

◆ color_qf() [4/5]

svg::color_qf::color_qf ( const color_qi & cqi)
inline

Definition at line 563 of file a60-svg-color.h.

Here is the call graph for this function:

◆ color_qf() [5/5]

svg::color_qf::color_qf ( const color e)
inline

Definition at line 571 of file a60-svg-color.h.

Here is the call graph for this function:

Member Function Documentation

◆ operator=()

color_qf & svg::color_qf::operator= ( const color_qf & )
default
Here is the call graph for this function:

◆ to_string()

string svg::color_qf::to_string ( color_qf s)
inlinestatic

Definition at line 578 of file a60-svg-color.h.

Here is the call graph for this function:

◆ to_color_qi()

color_qi svg::color_qf::to_color_qi ( ) const
inline

Back to RGB https://www.rapidtables.com/convert/color/hsv-to-rgb.html.

Definition at line 589 of file a60-svg-color.h.

Here is the call graph for this function:

◆ rgb_to_hsv()

color_qf svg::color_qf::rgb_to_hsv ( const color_qi & rgb) const
inline

Convert RGB to HSV.

Definition at line 594 of file a60-svg-color.h.

Here is the call graph for this function:

◆ hsv_to_rgb()

color_qi svg::color_qf::hsv_to_rgb ( const color_qf & hsv) const
inline

Convert HSV to RGB.

Definition at line 640 of file a60-svg-color.h.

Here is the call graph for this function:

◆ tint_perceptual()

color_qi svg::color_qf::tint_perceptual ( const uint n)
inline

Interpolated tinting algorithm from palette (ciecam16j70_palette).

Parameters
nis the [0,10] 11-step perceptual gradation from dark to light. Assume that color_qi has been converted to color_qf.

Definition at line 688 of file a60-svg-color.h.

Here is the call graph for this function:

◆ tint_percentage()

color_qi svg::color_qf::tint_percentage ( const double tp,
const double rmin = 0,
const double rmax = 100 )
inline

Procedural tinting algorithm.

Parameters
tptint percentage original color remaining
trangeupper/lower bounds for percentage range (0, 100)

Definition at line 722 of file a60-svg-color.h.

Here is the call graph for this function:

Member Data Documentation

◆ h

ftype svg::color_qf::h

Definition at line 550 of file a60-svg-color.h.

◆ s

ftype svg::color_qf::s

Hue degree between 0.0 and 360.0.

Definition at line 551 of file a60-svg-color.h.

◆ v

ftype svg::color_qf::v

Saturation between 0.0 (gray) and 1.0.

Definition at line 552 of file a60-svg-color.h.


The documentation for this struct was generated from the following file: