.\" Automatically generated by Pandoc 3.1.3 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "al_color_rgb_to_cmyk" "3alleg5" "" "Allegro reference manual" "" .hy .SH NAME .PP al_color_rgb_to_cmyk - Allegro 5 API .SH SYNOPSIS .IP .nf \f[C] #include void al_color_rgb_to_cmyk(float red, float green, float blue, float *cyan, float *magenta, float *yellow, float *key) \f[R] .fi .SH DESCRIPTION .PP Each RGB color can be represented in CMYK with a K component of 0 with the following formula: .IP .nf \f[C] C = 1 - R M = 1 - G Y = 1 - B K = 0 \f[R] .fi .PP This function will instead find the representation with the maximal value for K and minimal color components. .SH SEE ALSO .PP al_color_cmyk(3alleg5), al_color_cmyk_to_rgb(3alleg5)