al_color_rgb_to_cmyk(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

al_color_rgb_to_cmyk β€” okay bestie, this is a function from the Allegro 5 API πŸ’– (yes, the 3alleg5 manual section, we love her)


🌈 SYNOPSIS 🌈

#include <allegro5/allegro_color.h>

void al_color_rgb_to_cmyk(float red, float green, float blue,
   float *cyan, float *magenta, float *yellow, float *key)

πŸ’… DESCRIPTION πŸ’…

So here's the tea πŸ«–: every single RGB color can also be written as a CMYK color where the K component is just 0, using this lil formula:

C = 1 - R
M = 1 - G
Y = 1 - B
K = 0

But that's not what this function does, bestie 😭. This function goes the extra mile β€” instead of that lazy K = 0 version, it finds the representation that has the maximal value for K and the minimal color components. It's giving main character energy, honestly πŸ‘‘.


πŸ”₯ SEE ALSO πŸ”₯


That's the whole page, gorgeous πŸ’œ This was the Allegro reference manual's entry for al_color_rgb_to_cmyk(3alleg5) β€” no cap, that's all she wrote πŸŽ€βœ¨

πŸ“¦ where this page comes from