How does Illustrator’s Color Picker compute HSB and CMYK values?
I have a Illustrator document with default RGB color mode. The Color Picker displays the RGB values of selected object and it also displays HSB (Hue, Saturation, Brightness) and CMYK (Cyan, Magenta, Yellow) values of the selected object. But I do not understand how Illustrator calculates these (HSB and CMYK) values. I found RGB-to... conversion functions on the web which all seem to be based on the same algos (for example: https://gist.github.com/felipesabino/5066336 ) but the CMYK and HSB value obtained with these do not match with the values from Color Picker ? Can anybody please tell me how (algo?) Illustrator calculates the HSB and CMYK values from the RGB values in the Color Picker?
So far I understood that RGB to CMYK conversion depends on the type of printer which is used, but I thought that, as long as there is no printer selected the RGB to CMYK shall follow a default scheme/algo? I’m asking for help because I would like to use the HSB and CMYK values which are displayed in the Color Picker as guidelines for manually mixing colors for hobby painting purposes (on a ‘real’ palette and canvas). I found the CMYK and HSB values displayed in the Color Picker more realistic than the ones computed by the algo from URL above, for example for RGB color R=246 G=109 B=164 the Color Picker displays S=55%, B=96%, C=0%, M=70%, Y=3% K=0% whereas the algo from URL above calculates/converts to C=0%, M=54%, Y=32%, K=4% ?
Actually, I have a little JavaScript which creates a separate, dedicated Illustrator document which I call “color palette” document. The script creates as many squares filled with unique colors (associated with text labels indicating the ID of the color) as colors used in the original document. I would like to add additional text labels per color square to indicate CMYK and HSB values, ideally these calculated internally and displayed by the Color Picker but I don’t know how these are calculated.
Many thanks in advance for your time and advice!
