From 5ac6158f8ff999d4db18fb805c02b5c733e75ddb Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 1 Mar 2009 23:43:56 +0000 Subject: Use CIE xyY internally, rather than CIE XYZ. --- libdimension/dimension/color.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'libdimension/dimension/color.h') diff --git a/libdimension/dimension/color.h b/libdimension/dimension/color.h index 1f4a42e..34668e3 100644 --- a/libdimension/dimension/color.h +++ b/libdimension/dimension/color.h @@ -29,14 +29,15 @@ extern "C" { #endif -/* CIE 1931 XYZ color. */ +/* CIE 1931 xyY color. */ typedef struct { - double X, Y, Z; /* X, Y, and Z are the tristimulus values of a color in CIE - 1931 XYZ color space. We use an unlimited light model - here, where the range of X, Y, and Z are unbounded >= 0. */ - double alpha, trans; /* Alpha transparancy only lets light of this color - through; regular transparancy lets all colors - through */ + double x, y, Y; /* x and y are chromaticity coordinates, and Y is luminance, + in the CIE 1931 xyZ color space. We use an unlimited light + model, so x,y in [0, 1] and Y >= 0, with 1 = diffuse + white */ + double filter, trans; /* Filter transparancy only lets light of this color + through; regular transparancy lets all colors + through */ } dmnsn_color; #ifdef __cplusplus -- cgit v1.2.3