Loading...
Searching...
No Matches
colourTools.C File Reference
Include dependency graph for colourTools.C:

Go to the source code of this file.

Namespaces

namespace  Foam
 Namespace for OpenFOAM.

Functions

static void RGB_to_HSV (const scalar r, const scalar g, const scalar b, scalar &h, scalar &s, scalar &v)
static void HSV_to_RGB (const scalar h, const scalar s, const scalar v, scalar &r, scalar &g, scalar &b)
static scalar to_XYZ (scalar val)
static scalar from_XYZ (scalar val)
static void LAB_to_XYZ (const scalar L, const scalar a, const scalar b, scalar &x, scalar &y, scalar &z)
static void XYZ_to_LAB (const scalar x, const scalar y, const scalar z, scalar &L, scalar &a, scalar &b)
static scalar gamma_from_xyz (const scalar val)
static scalar gamma_to_xyz (const scalar val)
static void XYZ_to_RGB (const scalar x, const scalar y, const scalar z, scalar &r, scalar &g, scalar &b)
static void RGB_to_XYZ (scalar r, scalar g, scalar b, scalar &x, scalar &y, scalar &z)
void labToMsh (const vector &lab, vector &msh)
 Convert to special polar version of CIELAB.
void mshToLab (const vector &msh, vector &lab)
 Convert from special polar version of CIELAB.
static scalar angleDiff (scalar angle1, scalar angle2)
static scalar adjustHue (const vector &msh, scalar unsatM)

Variables

static constexpr scalar oneThird = 1.0 / 3.0
static constexpr scalar oneSixth = 1.0 / 6.0
static constexpr scalar twoThird = 2.0 / 3.0
static constexpr scalar fiveSixth = 5.0 / 6.0
static constexpr scalar ref_X = 0.9505
static constexpr scalar ref_Y = 1.000
static constexpr scalar ref_Z = 1.089

Detailed Description

Original source file colourTools.C

Note
Some implementation details from VTK vtkColorTransferFunction.cxx vtkMath.cxx

Definition in file colourTools.C.