From d29dc4485aad42ed31e4d482c7d5796364c93b37 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 20 Feb 2014 08:20:31 +0100 Subject: info: colour convertion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- info/blueshift.texinfo | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) 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 -- cgit v1.2.3-70-g09d2