91db3561e31b385e70d5f6732f8373dbe867db2e
[platform/upstream/groff.git] / contrib / hdtbl / examples / color_transitions.roff
1 .\" -*- mode: nroff -*-
2 .ig
3
4 color_transitions.roff
5
6 This file is part of groff, the GNU roff type-setting system.
7
8 Copyright (C) 2005-2014  Free Software Foundation, Inc.
9 written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
10
11 groff is free software; you can redistribute it and/or modify it under
12 the terms of the GNU General Public License as published by the Free
13 Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
15
16 groff is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19 for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>.
23
24 ..
25 .
26 .if !d sopath \
27 .  ds sopath
28 .
29 .so \*[sopath]examples/common.roff
30 .
31 .time start
32 .
33 .de ctab
34 .nr #cc 0
35 .PN 21 ".nr #cc +.05f" ".defcolor \En[t*#] rgb \\$1 \\$2 \\$3" ".TBL border= csp=0 cpd=.5n bgc=\\\\n[t*#] bc=" .TR .TD
36 .PN 21 .ETB
37 ..
38 .PN 30 Before table.
39 .TBL cols=3 width=33% border= csp=0 cpd=0 bgc=
40 .CPTN val=b Color Transitions
41 .TR 
42 .TD ".ctab 0+\En[#cc]u \En[#cc]u \En[#cc]u"     \"      black -> white
43 .TD ".ctab 1f-\En[#cc]u 1f-\En[#cc]u 1f-\En[#cc]u"\"    white -> black
44 .TD ".ctab 1f \En[#cc]u \En[#cc]u"              \"      red   -> white
45 .TR 
46 .TD ".ctab 0 1f-\En[#cc]u \En[#cc]u"            \"      green   -> blue
47 .TD ".ctab 1f 1f-\En[#cc]u 1f"                  \"      white   -> magenta
48 .TD ".ctab 1f \En[#cc]u 1f"                     \"      magenta -> white
49 .TR 
50 .TD ".ctab 0+\En[#cc]u \En[#cc]u 1f-\En[#cc]u"  \"      blue   -> yellow
51 .TD ".ctab 1f-\En[#cc]u 1f-\En[#cc]u \En[#cc]u" \"      yellow -> blue
52 .TD ".ctab 1f 0+\En[#cc]u 0"                    \"      red    -> yellow
53 .xTD ".ctab 0+\En[#cc]u 1f-\En[#cc]u 1f-\En[#cc]u"\"    cyan   -> red
54 .ETB 
55 .PN 30 After table.
56 .time
57 .\"     466MHz Celeron CPU, 384MB RAM 
58 .\"     WindowsXP/cygwin groff18.1:      3s
59 .\"     WindowsXP/cygwin groff19.2:     20s
60 .\"     Suse Linux 9.3 groff19.2         3s