1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
.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 < m@maandree.se >
|