Cyan, magenta and yellow are the secondary colors of light and the primary colors of pigments. This means, if white light is shined on a surface coated with cyan pigment, no red light is reflected from it. Cyan subtracts red light from white light. Unlike the RGB color model, CMY is subtractive, meaning higher values are associated with darker colors rather than lighter ones.
Devices that deploy pigments to color paper or other surfaces use the CMY color model, e.g. printers and copiers. The conversion from RGB to CKY is a simple operation, as is illustrated in the Python program below. It is important that all color values be normalized to [0, 1] before converting.
C = 1 - R M = 1 - G Y = 1 - B
Below is the code to convert RGB to CMY color model.
(1.0, 0.33725490196078434, 0.6627450980392157)
According to the color wheel shown above, equal amounts of cyan, magenta, and yellow should produce black. However, in real life, combining these pigments produces a muddy-colored black. To produce pure black, which is quite commonly used while printing, we add a fourth color — black, to the pigment mixture. This is called four-color printing. The addition of black in this model results in it being referred to as the CMYK color model.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- Differences between RGB and CMYK color schemes
- Set Pandas dataframe background Color and font color in Python
- Display the red, green and blue color planes of a color image in MATLAB
- Python | Relational fields in Django models
- Change Object Display Name using __str__ function - Django Models | Python
- PyQt5 Label – Setting color to the Color Effect
- PyQt5 Label – Accessing color of the Color Effect
- How To Use Seaborn Color Palette to Color Boxplot?
- Advantages and Disadvantages of different Classification Models
- Basic Illumination Models
- Exposing ML/DL Models as REST APIs
- Django Models | Set - 1
- Django Models | Set - 2
- BigIntegerField - Django Models
- AutoField - Django Models
- BigAutoField - Django Models
- BooleanField - Django Models
- CharField - Django Models
- DateField - Django Models
- DateTimeField - Django Models
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.