Short explanation
.
Three color values for red, green, and blue and transparency are determined from the four CMYK values for cyan, magenta, yellow, and black, and converted to the following notation: rgba (red, green, blue, 1).
When we convert the color red, it consists of 0% cyan, 100% magenta, 100% yellow, and 0% black. The CMYK notation is then as follows: cmyk (0%, 100%, 100%, 0%).
These color values are converted to an RGB value. This results in the color value in RGB notation with rgb (255, 0, 0, 1). There is always a loss of color accuracy to be expected when converting from CMYK to another color format. Since CMYK calculates without transparency value, it is not possible to calculate an RGBA color with transparency from it.
Calculation example
.
We will use the example of the color Dark Turquoise to describe a conversion from cmyk to rgba.
The starting value is the color in CMYK format:
CMYK = cmyk (82%, 1%, 0%, 18%)
These values are divided among the respective colors cyan, magenta, yellow, and black:
cyan = 82
Magenta = 1
yellow = 0
black = 18
The color values must now be converted from the CMYK color system to the decimal system of RGB. Since the colors do not match directly, the conversion is not so easy. The color values are determined with certain formulas.
Red = 255 * ((1 - Cyan / 100) * (1 - Black / 100))
Green = 255 * ((1 - Magenta / 100) * (1 - Black / 100))
Blue = 255 * ((1 - Yellow / 100) * (1 - Black / 100))
In our example, this means that at the beginning we have to calculate the value for red from cyan and black. Then we calculate the value for green from magenta and black. After that, we calculate the value for blue from yellow and black. This results in the following calculations:
red = 255 * ((1 - 82 / 100) * (1 - 18 / 100))
red = 38
green = 255 * ((1 - 1 / 100) * (1 - 18 / 100))
green = 207
blue = 255 * ((1 - 0 / 100) * (1 - 18 / 100))
blue = 209
To get the result of our calculation, we now need to convert the calculated decimal values into the RGB notation rgb (red, green, blue, transparency), where the value of transparency is always 1:
.
RGBA = rgba (38, 207, 209, 1)