summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension/color.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-03-01 23:43:56 +0000
committerTavian Barnes <tavianator@gmail.com>2009-03-01 23:43:56 +0000
commit5ac6158f8ff999d4db18fb805c02b5c733e75ddb (patch)
treec595048bae6b2860ef5264e1096eaac8c25b7f52 /libdimension/dimension/color.h
parentef4dbe789201bcb92596a67eb3fb3f3f03a09b49 (diff)
downloaddimension-5ac6158f8ff999d4db18fb805c02b5c733e75ddb.tar.xz
Use CIE xyY internally, rather than CIE XYZ.
Diffstat (limited to 'libdimension/dimension/color.h')
-rw-r--r--libdimension/dimension/color.h15
1 files changed, 8 insertions, 7 deletions
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