In the MetaFun manual (metafun-p.pdf) p.117, you may see an example using the color ".5\MPcolor{cmyyellow}". But I could not generate the color. Could anyone check the attached sample? Best, ChoF. ~~~~~~~~~~~~~~~~~~~~~~~~~ *** | Cho, Jin-Hwan == ChoF | ^ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ o | Dept. of Mathematics | --- | The University of Suwon | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | Korean TeX Users Group | | | http://www.ktug.or.kr | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | chofchof@ktug.or.kr | *** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jin-Hwan Cho wrote:
In the MetaFun manual (metafun-p.pdf) p.117, you may see an example using the color ".5\MPcolor{cmyyellow}". But I could not generate the color. Could anyone check the attached sample?
Let check - \setupcolors[state=start] - perhaps typo 'cmyyellow -> cmykyellow' or define it by yourself: \definecolor[cmyyellow][c=0,m=0,y=1,k=0] Cheers vit
Best, ChoF.
Vit Zyka wrote:
Jin-Hwan Cho wrote:
In the MetaFun manual (metafun-p.pdf) p.117, you may see an example using the color ".5\MPcolor{cmyyellow}". But I could not generate the color. Could anyone check the attached sample?
Let check - \setupcolors[state=start] - perhaps typo 'cmyyellow -> cmykyellow' or define it by yourself: \definecolor[cmyyellow][c=0,m=0,y=1,k=0]
Both were present in the example. I've created a collector item for this. (which means that I believe it really is a bug :-)) http://context.literatesolutions.com/collector/22/pcng_issue_view Cheers Taco
Taco Hoekwater wrote:
Jin-Hwan Cho wrote:
In the MetaFun manual (metafun-p.pdf) p.117, you may see an example using the color ".5\MPcolor{cmyyellow}". But I could not generate the color. Could anyone check the attached sample?
Both were present in the example. I've created a collector item for this. (which means that I believe it really is a bug :-))
I tried \definecolor[cmyyellow][y=1] \definecolor[cmycyan][c=1] and then .5[\MPcolor{cmycyan},\MPcolor{cmyyellow}] Without the cmyk=no option, color mixing really works wrong (I get yellow instead of green, perhaps c=.5,y=.5 would be something to expect), but with it, my Acrobat states that the colors are not proper cyan and yellow any more (but the exact numbers probably depend on settings for cmky->rgb->cmyk conversion). Well, the best conversion ever seen was the one by MS Word (when I tried to include a cmyk pdf image into a document): blue became green, red resulted in blue and yellow in pink ;) About the problem of "white cmyk color" (\definecolor[colorname][c=0,m=0,y=0,k=0]): I guess that the problem could lie in the \doifelse loop(s) of \dododefinecolor in colo-ini.tex. The loop simply checks if any color component is different from zero and chooses the first suitable color space. CMYK white is probably the only exception to this rule. What about deciding about the color system on the basis of settings used (r=0 => rgb or c=0 => cmy(k) or ...), before executing this (modified) loop? Or perhaps having some predefined "zero" colors (cmykwhite for example)? An usual rgb white can be used, but I'm not sure if it can be properly mixed with cmyk colors then. Mojca
Mojca Miklavec wrote:
\definecolor[cmyyellow][y=1] \definecolor[cmycyan][c=1]
and then .5[\MPcolor{cmycyan},\MPcolor{cmyyellow}]
look in mp-spec how cmyk is defined and you'll see why it gets messed up ... cmyk expands to a special directive and .5 scales that one, if needed i can make a scale macro Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen wrote:
Mojca Miklavec wrote:
\definecolor[cmyyellow][y=1] \definecolor[cmycyan][c=1]
and then .5[\MPcolor{cmycyan},\MPcolor{cmyyellow}]
look in mp-spec how cmyk is defined and you'll see why it gets messed up ... cmyk expands to a special directive and .5 scales that one, if needed i can make a scale macro
I'm sorry. I could have thought about that before :(. Mojca
Taco Hoekwater wrote:
Vit Zyka wrote:
Jin-Hwan Cho wrote:
In the MetaFun manual (metafun-p.pdf) p.117, you may see an example using the color ".5\MPcolor{cmyyellow}". But I could not generate the color. Could anyone check the attached sample?
Let check - \setupcolors[state=start] - perhaps typo 'cmyyellow -> cmykyellow' or define it by yourself: \definecolor[cmyyellow][c=0,m=0,y=1,k=0]
Both were present in the example. I've created a collector item for this. (which means that I believe it really is a bug :-))
http://context.literatesolutions.com/collector/22/pcng_issue_view
i'll add an note that taco will implement specials associated with paths in teh coming metapost release -) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Jin-Hwan Cho wrote:
In the MetaFun manual (metafun-p.pdf) p.117, you may see an example using the color ".5\MPcolor{cmyyellow}". But I could not generate the color. Could anyone check the attached sample?
You get pretty different results depending on what you write to \setupcolors[conversion=yes/no/always,reduction=yes/no,rgb=yes/no,cmyk=yes/no,mpcmyk=yes/no] but I don't know what exactly they mean. The example in the manual with \MPcolor{cmyyellow} doesn't seem to be proper "cmyk kind of yellow" (c=0.08,m=0,y=0.89,k=0), so Hans probably used a set of setups which handles the .5\MPcolor{cmyyellow} the same way as if it was an "rgb yellow". Does \setupcolors[cmyk=no] suit your needs? However, you have to be aware that your "cmyyellow" won't be y=1 any more, but the yellow mentioned above. Your example results in a color that is (c=.68,m=.71,y=.64,k=.86), so it is still "a kind of OK mixing", but the computer doesn't know in which way you would like the colors to be mixed. An alternative (for brighter colors in this case) is to write .5[\MPcolor{cmyyellow},\MPcolor{cmywhite}] if you define cmykwhite to be something like \definecolor[cmywhite][y=0.00001] What I don't understand is why \definecolor[cmywhite][c=0,y=0,m=0,k=0] is converted to black (even a warning is issued). Mojca
Mojca Miklavec wrote:
yellow" (c=0.08,m=0,y=0.89,k=0), so Hans probably used a set of setups which handles the .5\MPcolor{cmyyellow} the same way as if it was an "rgb yellow".
indeed, i use slightly different red/yellow in the metafun manual -) but i'm not sure if that is the problem here Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Jin-Hwan Cho wrote:
In the MetaFun manual (metafun-p.pdf) p.117, you may see an example using the color ".5\MPcolor{cmyyellow}". But I could not generate the color. Could anyone check the attached sample?
scaling of cmykcolors does not work when cmykcolors i sset to true; this is because i used colors as signals for the postprocessor and in this case the postprocessor code gets scaled and is no longer recognizable as such and therefore it's treates as a normal color tricky stuff a solution is to define the 50% color beforehand Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (5)
-
Hans Hagen
-
Jin-Hwan Cho
-
Mojca Miklavec
-
Taco Hoekwater
-
Vit Zyka