1al_color_lch(3) al_color_lch(3)
2
3
4
6 al_color_lch - Allegro 5 API
7
9 #include <allegro5/allegro_color.h>
10
11 ALLEGRO_COLOR al_color_lch(float l, float c, float h)
12
14 Return an ALLEGRO_COLOR(3) structure from CIE LCH values. LCH colors
15 are very similar to HSL, with the same meaning of L and H and C correā
16 sponding to S. However LCH is more visually uniform. Furthermore,
17 this function expects the angle for H in radians and not in degree.
18
19 The CIE LCH color space is a cylindrical representation of the L*a*b*
20 color space. The L component is the same and C and H are computed like
21 this:
22
23 C = sqrt(a * a + b * b)
24 H = atan2(b, a)
25
27 5.2.3
28
30 al_color_lch_to_rgb(3), al_color_rgb_to_lch(3)
31
32
33
34Allegro reference manual al_color_lch(3)