The solution to create a qml file from RGB field values was presented in Python in How to use a field-to-RGB mapping for symbology in QGIS?
but, as pointed out by Ryan Garnett, the problem is to convert the CMYK colour to RGB because:
"it seems that there is the notion out there that conversion from CMYK to RGB is easy. Newsflash: It’s not. As every graphic designer knows, the CMYK color gamut is smaller than the the RGB color gamut (even the sRGB color gamut). You can’t take a CMYK color and convert it to an out-of-CMYK-gamut RGB color! That’s nonsense! And it’s precisely what most conversion algorithms and color pickers out there do! Even Adobe Kuler!!! Since yesterday, I’ve studied dozens of algorithms and color pickers that claim to do CMYK -> RGB conversion, and every single one of them is wrong."
So basically, these algorithms convert a CMYK color to an RGB color that is outside of the CMYK color gamut! A color that cannot be represented with CMYK is supposed to be the result of a CMYK->RGB conversion?
from Lea Verou in 100% Cyan in CMYK is NOT rgb(0,255,255)!!, because the correct conversion of a CMYK value to RGB would depend on the source CMYK space (?) and the destination RGB space (QGIS).
But you can always try with one of these algorithms as an approximation (from an old avenue script cmykrgb.ave at CMYK to RGB and RGB to CMYK algorithms):
- create new R, G, B fields
- use the field calculator to convert the C,M,Y,K values (in the range 0-100) to R,G,B values (range 0-255 in QGIS) with the formulas:
R = (1 - ((C + K)/100)) * 255
G = (1 - ((M + K)/100)) * 255
B = (1 - ((Y + K)/100)) * 255
But if all are the algorithms are wrong, good luck.