blob: f661b2445f10063efaa1388dcba43200818423f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
%D \module
%D [ file=colo-hex,
%D version=2004.06.23,
%D title=\CONTEXT\ Color Macros,
%D subtitle=Hex Colors,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This is built in.
% \definecolor[rgbtestcolor] [r=0.87843,g=0.87451,b=0.89020] % RGB(224,223,227)
% \definecolor[hextestcolor] [\letterhash E0DFE3] % or [h=E0DFE3]
%
% \startMPpage
% path p ; % example by Peter Rolf
% p := unitsquare xyscaled(5cm,5cm) ;
% fill (point 0 of p -- point 1 of p -- point 2 of p --cycle) withcolor \MPcolor{rgbtestcolor} ; % bottom right part of the square
% fill (point 0 of p -- point 3 of p -- point 2 of p --cycle) withcolor \MPcolor{hextestcolor} ; % top left part
% \stopMPpage
\def\checkhexcolor[#1]{\doifcolorelse{#1}\donothing{\definecolor[#1][x=#1]}} % is this ok?
\endinput
|