aboutsummaryrefslogblamecommitdiffstats
path: root/LIBCOLOUR_SRGB.7
blob: e6f7888f987606e7facbdc5559170c7b1e601c29 (plain) (tree)
1
2
3
4
5
6
7
8
9
10






                                         


                                                               














                                             






                                                 
























                                                      
                                                        
















                                                      
.TH LIBCOLOUR_SRGB 7 libcolour
.SH NAME
LIBCOLOUR_SRGB - Standard RGB
.SH DESCRIPTION
sRGB colours are presented with either of
.nf

	typedef struct libcolour_srgb_f libcolour_srgb_f_t;
	typedef struct libcolour_srgb_lf libcolour_srgb_lf_t;
	typedef struct libcolour_srgb_llf libcolour_srgb_llf_t;

.fi
These
.BR struct s
use
.BR float ,
.BR double ,
and
.BR long\ double ,
respecitively, for the values stored in them,
and are otherwise identical.
.B struct libcolour_srgb_f
is defined as
.nf

	struct libcolour_srgb_f {
		enum libcolour_model \fImodel\fP;
		float \fIR\fP;
		float \fIG\fP;
		float \fIB\fP;
		int \fIwith_transfer\fP;
	};

.fi
.I .model
shall be set to
.BR LIBCOLOUR_SRGB .
In
.BR union\ libcolour_colour_f ,
.BR union\ libcolour_colour_lf ,
and
.BR union\ libcolour_colour_llf ,
.I .srgb
is used for sRGB colours.
.P
.IR .R ,
.IR .G ,
and
.I .B
hold the red, green, and blue values, respectively,
and shall have a value between 0 and 1, inclusively,
for the colour to be in gamut.
.I .with_transfer
shall be set to a non-zero value if the sRGB transfer
function (\(dqgamma function\(dq) is applied, and zero
otherwise, meaning colours are linearly encoded.
.P
The RGB colour model, of which sRGB is a specific colour
space, is an additive colour model, that is, without a
transfer function applied, linearily isomorphic to
CIE 1931 XYZ.
.P
This is the colour model and colour space normally
used on computers, it is however not the colour space
your monitor have, although it is close to it. sRGB
is designed after the human eye, but fails to take
into account how the brain process the input to figure
out which colour it actually receives.
.SH SEE ALSO
.BR libcolour (7),
.BR libcolour_srgb_encode (3),
.BR libcolour_srgb_decode (3)
.SH AUTHORS
Mattias Andrée
.RI < maandree@kth.se >