1al_color_rgb_to_cmyk(3) al_color_rgb_to_cmyk(3)
2
3
4
6 al_color_rgb_to_cmyk - Allegro 5 API
7
9 #include <allegro5/allegro_color.h>
10
11 void al_color_rgb_to_cmyk(float red, float green, float blue,
12 float *cyan, float *magenta, float *yellow, float *key)
13
15 Each RGB color can be represented in CMYK with a K component of 0 with
16 the following formula:
17
18 C = 1 - R
19 M = 1 - G
20 Y = 1 - B
21 K = 0
22
23 This function will instead find the representation with the maximal
24 value for K and minimal color components.
25
27 al_color_cmyk(3), al_color_cmyk_to_rgb(3)
28
29
30
31Allegro reference manual al_color_rgb_to_cmyk(3)