summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension/color.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-12-07 19:50:11 -0500
committerTavian Barnes <tavianator@gmail.com>2009-12-07 19:50:11 -0500
commit4b95011c1ce2e7591202ac80323c1de1e3b32a4e (patch)
treee48365d768c0786aa25ee4ab7e046611790000aa /libdimension/dimension/color.h
parente971200727e4708cc1b73fb4652208dd1bf284c8 (diff)
downloaddimension-4b95011c1ce2e7591202ac80323c1de1e3b32a4e.tar.xz
Work in sRGB to be more like POV-Ray.
Diffstat (limited to 'libdimension/dimension/color.h')
-rw-r--r--libdimension/dimension/color.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/libdimension/dimension/color.h b/libdimension/dimension/color.h
index 10fa1a7..cd44712 100644
--- a/libdimension/dimension/color.h
+++ b/libdimension/dimension/color.h
@@ -25,12 +25,12 @@
#ifndef DIMENSION_COLOR_H
#define DIMENSION_COLOR_H
-/* Internally, we use CIE 1931 XYZ color. */
+/* Internally, we use sRGB color. */
typedef struct {
double filter, trans; /* Filter transparancy only lets light of this color
through; regular transparancy lets all colors
through. filter + trans should be <= 1.0. */
- double X, Y, Z;
+ double R, G, B;
} dmnsn_color;
typedef struct {
@@ -46,10 +46,6 @@ typedef struct {
} dmnsn_CIE_xyY;
typedef struct {
- double R, G, B; /* CIE 1931 RGB, a linear transformation of CIE XYZ */
-} dmnsn_CIE_RGB;
-
-typedef struct {
double L, a, b; /* L is luminence (100 = diffuse white); a and b are color-
opponent dimensions. This color space is used for color
arithmetic. */
@@ -75,14 +71,12 @@ extern const dmnsn_CIE_XYZ dmnsn_whitepoint;
dmnsn_color dmnsn_color_from_XYZ(dmnsn_CIE_XYZ XYZ);
dmnsn_color dmnsn_color_from_xyY(dmnsn_CIE_xyY xyY);
-dmnsn_color dmnsn_color_from_RGB(dmnsn_CIE_RGB RGB);
dmnsn_color dmnsn_color_from_Lab(dmnsn_CIE_Lab Lab, dmnsn_CIE_XYZ white);
dmnsn_color dmnsn_color_from_Luv(dmnsn_CIE_Luv Luv, dmnsn_CIE_XYZ white);
dmnsn_color dmnsn_color_from_sRGB(dmnsn_sRGB sRGB);
dmnsn_CIE_XYZ dmnsn_XYZ_from_color(dmnsn_color color);
dmnsn_CIE_xyY dmnsn_xyY_from_color(dmnsn_color color);
-dmnsn_CIE_RGB dmnsn_RGB_from_color(dmnsn_color color);
dmnsn_CIE_Lab dmnsn_Lab_from_color(dmnsn_color color, dmnsn_CIE_XYZ white);
dmnsn_CIE_Luv dmnsn_Luv_from_color(dmnsn_color color, dmnsn_CIE_XYZ white);
dmnsn_sRGB dmnsn_sRGB_from_color(dmnsn_color color);