Am 2018-11-18 um 19:26 schrieb Hans Hagen <j.ha...@xs4all.nl>: > On 11/14/2018 4:51 PM, Wolfgang Schuster wrote: >> Jan U. Hasecke schrieb am 14.11.18 um 11:39: >>> Hi all, >>> >>> attached you find my colormanagement tests and I need your help to >>> understand and debug the situation. >>> >>> I am testing together with a friend of mine, a professional >>> colormanager, who does not know ConTeXt. >> Even without a color profile the results from the normal conversion of >> colors from cmyk to rgb >> can result in differences between ConTeXt and Gimp because both use >> different formulas. >> This is the formula from ConTeXt (attr-col.lua) >> r = 1.0 - math.min(1.0,c+k) >> g = 1.0 - math.min(1.0,m+k) >> b = 1.0 - math.min(1.0,y+k) >> and this is the one from Gimp >> (https://gitlab.gnome.org/GNOME/gimp/blob/master/libgimpcolor/gimpcolorspace.c) >> r = 1.0 - math.min(1.0,c*(1.0-k)+k) >> g = 1.0 - math.min(1.0,m*(1.0-k)+k) >> b = 1.0 - math.min(1.0,y*(1.0-k)+k) > Are there more variants? Do we need to support variants?
Oh my, color separation is a science of its own, but not an exact science... Any really usable color conversion algorithm uses color profiles. It would make sense to outsource color calculations to a color management library like LittleCMS. Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________