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.
- Python | Relational fields in Django models
- Change Object Display Name using __str__ function - Django Models | Python
- Display the red, green and blue color planes of a color image in MATLAB
- Color Spaces in OpenCV | Python
- Color game using Tkinter in Python
- Python | OpenCV BGR color palette with trackbars
- Python | Visualizing image in different color spaces
- Detection of a specific color(blue here) using OpenCV with Python
- Opening multiple color windows to capture using OpenCV in Python
- Python PIL | ImageEnhance.Color() and ImageEnhance.Contrast() method
- Django Models | Set - 2
- Django Models | Set - 1
- PositiveIntegerField - Django Models
- TimeField - Django Models
- IntegerField - 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.