Changes

Jump to navigation Jump to search
81 bytes added ,  16:38, 27 August 2022
→‎The basics: - another typo
{{Color_navigation_Trial}}
[[MetaPost]] only supports the RGB color space, although with the help of [[MetaFun - MetaPost in ConTeXt|MetaFun]] you can face transparency and CMYK colors. This article describes the use of colors in MetaPost and MetaFun.
== The basics ==
Colors are defined as vectors with three components: a red, green and blue one. Like pens, colors have a {{code|with...}} command:
withcolor (.4,.5,.,6)
You can define color variables like so:
color darkred ; darkred := (.625,0.,0) ;
% use the color
withcolor darkred
<context source=yes>
% MKII% \runMPgraphicstrue
\setupcolors[state=start]
\starttext
* (If you are not using the standalone, regenerate your TeX with {{code|sudo update-texmf}})
* Lastly, regenerate the MetaFun format with {{code|texexec --make}}. Transparency should work now.
 
[[Category:Color]]
[[Category:Graphics]]
174

edits

Navigation menu