Foam::colourTools Namespace Reference

Utility methods for colours and colour spaces. More...

Functions

void rgbToHsv (const vector &rgb, vector &hsv)
 Convert RGB to HSV. More...
 
vector rgbToHsv (const vector &rgb)
 Convert RGB to HSV. More...
 
void hsvToRgb (const vector &hsv, vector &rgb)
 Convert HSV to RGB. More...
 
vector hsvToRgb (const vector &hsv)
 Convert HSV to RGB. More...
 
void rgbToXyz (const vector &rgb, vector &xyz)
 Convert RGB to XYZ. More...
 
vector rgbToXyz (const vector &rgb)
 Convert RGB to XYZ. More...
 
void xyzToRgb (const vector &xyz, vector &rgb)
 Convert XYZ to RGB. More...
 
vector xyzToRgb (const vector &xyz)
 Convert XYZ to RGB. More...
 
void labToXyz (const vector &lab, vector &xyz)
 Convert LAB to XYZ. More...
 
vector labToXyz (const vector &lab)
 Convert LAB to XYZ. More...
 
void xyzToLab (const vector &xyz, vector &lab)
 Convert XYZ to LAB. More...
 
vector xyzToLab (const vector &xyz)
 Convert XYZ to LAB. More...
 
void rgbToLab (const vector &rgb, vector &lab)
 Convert RGB to LAB. More...
 
vector rgbToLab (const vector &rgb)
 Convert RGB to LAB. More...
 
void labToRgb (const vector &lab, vector &rgb)
 Convert LAB to RGB. More...
 
vector labToRgb (const vector &lab)
 Convert LAB to RGB. More...
 
void interpolateDiverging (scalar s, const vector &rgb1, const vector &rgb2, vector &result)
 Interpolate RGB values with diverging color map. More...
 
vector interpolateDiverging (scalar s, const vector &rgb1, const vector &rgb2)
 Interpolate RGB values with diverging color map. More...
 
void interpolateHSV (scalar s, const vector &rgb1, const vector &rgb2, vector &result)
 Interpolate RGB values in HSV colourspace. More...
 
vector interpolateHSV (scalar s, const vector &rgb1, const vector &rgb2)
 Interpolate RGB values in HSV colourspace. More...
 
vector interpolateRGB (scalar s, const vector &rgb1, const vector &rgb2)
 Interpolate RGB values in RGB colourspace. More...
 

Detailed Description

Utility methods for colours and colour spaces.

Source files

Function Documentation

◆ rgbToHsv() [1/2]

void rgbToHsv ( const vector rgb,
vector hsv 
)

Convert RGB to HSV.

Definition at line 352 of file colourTools.C.

References Foam::RGB_to_HSV().

Referenced by interpolateHSV(), and rgbToHsv().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgbToHsv() [2/2]

vector Foam::colourTools::rgbToHsv ( const vector rgb)
inline

Convert RGB to HSV.

Definition at line 57 of file colourTools.H.

References rgbToHsv().

Here is the call graph for this function:

◆ hsvToRgb() [1/2]

void hsvToRgb ( const vector hsv,
vector rgb 
)

Convert HSV to RGB.

Definition at line 357 of file colourTools.C.

References Foam::HSV_to_RGB().

Referenced by hsvToRgb(), and interpolateHSV().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hsvToRgb() [2/2]

vector Foam::colourTools::hsvToRgb ( const vector hsv)
inline

Convert HSV to RGB.

Definition at line 69 of file colourTools.H.

References hsvToRgb().

Here is the call graph for this function:

◆ rgbToXyz() [1/2]

void rgbToXyz ( const vector rgb,
vector xyz 
)

Convert RGB to XYZ.

Definition at line 363 of file colourTools.C.

References Foam::RGB_to_XYZ().

Referenced by rgbToXyz().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgbToXyz() [2/2]

vector Foam::colourTools::rgbToXyz ( const vector rgb)
inline

Convert RGB to XYZ.

Definition at line 81 of file colourTools.H.

References rgbToXyz().

Here is the call graph for this function:

◆ xyzToRgb() [1/2]

void xyzToRgb ( const vector xyz,
vector rgb 
)

Convert XYZ to RGB.

Definition at line 368 of file colourTools.C.

References Foam::XYZ_to_RGB().

Referenced by labToRgb(), and xyzToRgb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xyzToRgb() [2/2]

vector Foam::colourTools::xyzToRgb ( const vector xyz)
inline

Convert XYZ to RGB.

Definition at line 92 of file colourTools.H.

References xyzToRgb().

Here is the call graph for this function:

◆ labToXyz() [1/2]

void labToXyz ( const vector lab,
vector xyz 
)

Convert LAB to XYZ.

Definition at line 374 of file colourTools.C.

References Foam::LAB_to_XYZ().

Referenced by labToRgb(), and labToXyz().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ labToXyz() [2/2]

vector Foam::colourTools::labToXyz ( const vector lab)
inline

Convert LAB to XYZ.

Definition at line 104 of file colourTools.H.

References labToXyz().

Here is the call graph for this function:

◆ xyzToLab() [1/2]

void xyzToLab ( const vector xyz,
vector lab 
)

Convert XYZ to LAB.

Definition at line 380 of file colourTools.C.

References Foam::XYZ_to_LAB().

Referenced by xyzToLab().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xyzToLab() [2/2]

vector Foam::colourTools::xyzToLab ( const vector xyz)
inline

Convert XYZ to LAB.

Definition at line 116 of file colourTools.H.

References xyzToLab().

Here is the call graph for this function:

◆ rgbToLab() [1/2]

void rgbToLab ( const vector rgb,
vector lab 
)

Convert RGB to LAB.

Definition at line 386 of file colourTools.C.

References Foam::RGB_to_XYZ(), and Foam::XYZ_to_LAB().

Referenced by interpolateDiverging(), and rgbToLab().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgbToLab() [2/2]

vector Foam::colourTools::rgbToLab ( const vector rgb)
inline

Convert RGB to LAB.

Definition at line 128 of file colourTools.H.

References rgbToLab().

Here is the call graph for this function:

◆ labToRgb() [1/2]

void labToRgb ( const vector lab,
vector rgb 
)

Convert LAB to RGB.

Definition at line 394 of file colourTools.C.

References labToXyz(), and xyzToRgb().

Referenced by interpolateDiverging(), and labToRgb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ labToRgb() [2/2]

vector Foam::colourTools::labToRgb ( const vector lab)
inline

Convert LAB to RGB.

Definition at line 140 of file colourTools.H.

References labToRgb().

Here is the call graph for this function:

◆ interpolateDiverging() [1/2]

void interpolateDiverging ( scalar  s,
const vector rgb1,
const vector rgb2,
vector result 
)

Interpolate RGB values with diverging color map.

Definition at line 403 of file colourTools.C.

References Foam::adjustHue(), Foam::angleDiff(), Foam::labToMsh(), labToRgb(), Foam::max(), Foam::mshToLab(), Foam::constant::mathematical::pi(), rgbToLab(), and s.

Referenced by interpolateDiverging(), and colourTable::value().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ interpolateDiverging() [2/2]

vector Foam::colourTools::interpolateDiverging ( scalar  s,
const vector rgb1,
const vector rgb2 
)
inline

Interpolate RGB values with diverging color map.

Definition at line 159 of file colourTools.H.

References interpolateDiverging(), and s.

Here is the call graph for this function:

◆ interpolateHSV() [1/2]

void interpolateHSV ( scalar  s,
const vector rgb1,
const vector rgb2,
vector result 
)

Interpolate RGB values in HSV colourspace.

Definition at line 467 of file colourTools.C.

References hsvToRgb(), rgbToHsv(), and s.

Referenced by interpolateHSV(), and colourTable::value().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ interpolateHSV() [2/2]

vector Foam::colourTools::interpolateHSV ( scalar  s,
const vector rgb1,
const vector rgb2 
)
inline

Interpolate RGB values in HSV colourspace.

Definition at line 182 of file colourTools.H.

References interpolateHSV(), and s.

Here is the call graph for this function:

◆ interpolateRGB()

vector Foam::colourTools::interpolateRGB ( scalar  s,
const vector rgb1,
const vector rgb2 
)
inline

Interpolate RGB values in RGB colourspace.

Definition at line 196 of file colourTools.H.

References s.

Referenced by colourTable::value().

Here is the caller graph for this function: