summaryrefslogtreecommitdiffstats
path: root/info
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-02-20 08:20:31 +0100
committerMattias Andrée <maandree@operamail.com>2014-02-20 08:20:31 +0100
commitd29dc4485aad42ed31e4d482c7d5796364c93b37 (patch)
treeb356ae7e422e9b855d0dafd401b8fcd9e93ee1c6 /info
parentupdate todo list (diff)
downloadblueshift-d29dc4485aad42ed31e4d482c7d5796364c93b37.tar.gz
blueshift-d29dc4485aad42ed31e4d482c7d5796364c93b37.tar.bz2
blueshift-d29dc4485aad42ed31e4d482c7d5796364c93b37.tar.xz
info: colour convertion
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--info/blueshift.texinfo36
1 files changed, 36 insertions, 0 deletions
diff --git a/info/blueshift.texinfo b/info/blueshift.texinfo
index 2383411..a35044c 100644
--- a/info/blueshift.texinfo
+++ b/info/blueshift.texinfo
@@ -408,11 +408,47 @@ yeild the same result as in the reverse
order, the latter is the correct way to
apply gamma correction.
+Before performing adjusts you most (not required
+the very first time) reset the curves by invoking
+@code{start_over} (no parameters.) Otherwise the
+adjustments will accumulate.
+
If you want to write your own functions
@code{curves(r, g, b)} returns a tuple
containing the tuples @code{(r_curve, r)},
@code{(g_curve, g)} and @code{(b_curve, b)}.
+To make this easier Blueshift provies a set
+of functions used to convert colour space:
+
+@table @code
+@item linear_to_standard(r, g, b)
+Convert [0, 1] linear RGB to [0, 1] sRGB
+
+@item standard_to_linear(r, g, b)
+Convert [0, 1] sRGB to linear [0, 1] RGB
+
+@item ciexyy_to_ciexyz(x, y, Y)
+Convert CIE xyY to CIE XYZ
+
+@item ciexyz_to_ciexyy(X, Y, Z)
+Convert CIE XYZ to CIE xyY
+
+@item ciexyz_to_linear(X, Y, Z)
+Convert CIE XYZ to [0, 1] linear RGB
+
+@item linear_to_ciexyz(r, g, b)
+Convert [0, 1] linear RGB to CIE XYZ
+
+@item srgb_to_ciexyy(r, g, b)
+Convert [0, 1] sRGB to CIE xyY
+
+@item ciexyy_to_srgb(x, y, Y)
+Convert CIE xyY to [0, 1] sRGB
+@end table
+All these functions return lists with
+the three colour components, not tuples.
+Input and output is one colour instance.
@node GNU Free Documentation License