Changes

Jump to navigation Jump to search
39 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
174

edits

Navigation menu