Changes

Jump to navigation Jump to search
2,265 bytes added ,  19:33, 16 November 2005
colorizing sample by Hans
\stoptext
</context>
 
=Colorizing Grayscale Pictures=
 
Another sample by Hans (mailing list 2005-11-16) demonstrates a lot of different possibilities:
 
<texcode>
\setuplayout[header=0pt,footer=0pt,width=middle,height=middle,backspace=1cm,topspace=1cm]
\setupcolors[state=start]
 
\startbuffer
\definecolor [blue] [c=1, m=.38, y=0, k=.64]
\definecolor [yellow] [c=0, m=.28, y=1, k=.06]
 
\definecolor [blue-100] [blue] [p=1]
\definecolor [yellow-100] [yellow] [p=1]
 
\definemultitonecolor [combicolor] [blue=.12, yellow=.28] [c=.1, m=.1, y=.3, k=.1]
 
\definemultitonecolor [combicolor-b] [blue=1] [c=1, m=.38, y=0, k=.64] % force multitone
\definemultitonecolor [combicolor-y] [yellow=1] [c=0, m=.28, y=1, k=.06] % force multitone
 
\useexternalfigure[demo-a][mill.png] [object=no, width=.2\textwidth]
\useexternalfigure[demo-b][hacker-bw.jpg][object=no, width=.2\textwidth]
 
\startbaselinecorrection
\startcombination[4*1]
{\externalfigure[demo-a]} {no color}
{\externalfigure[demo-a][color=combicolor]} {indexed duotone}
{\externalfigure[demo-a][color=combicolor-b]} {spot color}
{\externalfigure[demo-a][color=combicolor-y]} {spot color}
\stopcombination
\stopbaselinecorrection
 
\startbaselinecorrection
\startcombination[4*1]
{\externalfigure[demo-b]} {no color}
{\externalfigure[demo-b][color=combicolor]} {indexed duotone}
{\externalfigure[demo-b][color=combicolor-b]} {spot color}
{\externalfigure[demo-b][color=combicolor-y]} {spot color}
\stopcombination
\stopbaselinecorrection
 
\startbaselinecorrection
\startcombination[4*1]
{\externalfigure[demo-a]} {no color}
{\externalfigure[demo-a][color=combicolor]} {indexed duotone}
{\externalfigure[demo-a][color=blue-100]} {spot color}
{\externalfigure[demo-a][color=yellow-100]} {spot color}
\stopcombination
\stopbaselinecorrection
 
\startbaselinecorrection
\startcombination[4*1]
{\externalfigure[demo-b]} {no color}
{\externalfigure[demo-b][color=combicolor]} {indexed duotone}
{\externalfigure[demo-b][color=blue-100]} {spot color}
{\externalfigure[demo-b][color=yellow-100]} {spot color}
\stopcombination
\stopbaselinecorrection
\stopbuffer
 
\getbuffer \typebuffer
 
\stoptext
</texcode>

Navigation menu