Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

ColorScale Struct Reference

Collection of color-related definitions and functions. More...

#include <ColorScale.h>

List of all members.

Public Methods

void rgb2ihs (const real &r, const real &g, const real &b, real &i, real &h, real &s)
void ihs2rgb (const real &i, const real &h, const real &s, real &r, real &g, real &b)
Color ihs_interpolation (const real &value)
void rgb2cie (const real &r, const real &g, const real &b, real &x, real &y, real &z)
void cie2rgb (const real &l, const real &u, const real &v, real &x, real &y, real &z)
Color cie_interpolation (const real &value)
void rgb2luv (const real &r, const real &g, const real &b, real &l, real &u, real &v)
void luv2rgb (const real &l, const real &u, const real &v, real &r, real &g, real &b)
Color luv_interpolation (const real &value)
Color getColor (const real &value, const char *colorspace="CIE")

Public Attributes

Color low
Color high
real min_value
real max_value


Detailed Description

Collection of color-related definitions and functions.

NAME: ColorScale - Collection of color-related definitions and functions

DESCRIPTION:

The "ColorScale" struct contains two floating point values (min_value, max_value) and two colors (low, high). The "low" color is associated with the minimum value, and the "high" color is associated with the maximum value. Functions for color conversion between RGB and the color spaces IHS, CIE and LUV are available. A floating point value between min_value and max_value can be given to find an associated color. The color is found using an interpolation in one of the above color spaces, based on the values of the data members of the struct, and the given floating point value.


Member Function Documentation

void ColorScale::cie2rgb ( const real & l,
const real & u,
const real & v,
real & x,
real & y,
real & z )
 

converts a CIE color to a RGB color.

Color ColorScale::cie_interpolation ( const real & value )
 

performs an interpolation in the CIE color space to find a color corresponding to a specified value and the values of the data members of the struct.

Color ColorScale::getColor ( const real & value,
const char * colorspace = "CIE" )
 

performs an interpolation in the one of the color spaces to find a color corresponding to a specified value and the values of the data members of the struct. The selected color space is specified as a parameter ("IHS", "CIE" or "LUV").

void ColorScale::ihs2rgb ( const real & i,
const real & h,
const real & s,
real & r,
real & g,
real & b )
 

converts an IHS color to a RGB color.

Color ColorScale::ihs_interpolation ( const real & value )
 

performs an interpolation in the IHS color space to find a color corresponding to a specified value and the values of the data members of the struct.

void ColorScale::luv2rgb ( const real & l,
const real & u,
const real & v,
real & r,
real & g,
real & b )
 

converts a LUV color to a RGB color.

Color ColorScale::luv_interpolation ( const real & value )
 

performs an interpolation in the LUV color space to find a color corresponding to a specified value and the values of the data members of the struct.

void ColorScale::rgb2cie ( const real & r,
const real & g,
const real & b,
real & x,
real & y,
real & z )
 

converts a RGB color to a CIE color.

void ColorScale::rgb2ihs ( const real & r,
const real & g,
const real & b,
real & i,
real & h,
real & s )
 

converts a RGB color to an IHS color.

void ColorScale::rgb2luv ( const real & r,
const real & g,
const real & b,
real & l,
real & u,
real & v )
 

converts a RGB color to a LUV color.


Member Data Documentation

Color ColorScale::high
 

Color ColorScale::low
 

real ColorScale::max_value
 

real ColorScale::min_value
 


The documentation for this struct was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.