6 This file is part of groff, the GNU roff type-setting system.
8 Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
9 written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
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.
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
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/>.
34 ".nr #cc +(1f / \\$1)" \
35 ".defcolor \En[t*#] rgb \\$2 \\$3 \\$4" \
36 ".TBL csp=\n[l]/(12*\\$1+2) border= cpd=0 bgc=\\\\n[t*#] bc=" \
37 ".if (\\\\n+[*#] == 1) \
38 .CPTN Rainbow Colors \[em] Nested Tables with Colored Backgrounds \
44 .ctab \n[*n] 1 0 \En[#cc]u \" rot -> magenta
45 .ctab \n[*n] 1-\En[#cc]u 0 1 \" magenta -> blue
46 .ctab \n[*n] 0 \En[#cc]u 1 \" blue -> cyan
47 .ctab \n[*n] 0 1 1-\En[#cc]u \" cyan -> green
48 .ctab \n[*n] \En[#cc]u 1 0 \" green -> yellow
49 .ctab \n[*n] 1 1-\En[#cc]u 0 \" yellow -> red
65 ".nr #cc +(1f / \\$1)" \
66 ".defcolor \En[t*#] rgb \\$2 \\$3 \\$4" \
67 ".TBL border=\n[l]/(12*\\$1+2) csp=0 cpd=0 bc=\\\\n[t*#] bgc=" \
68 ".if (\\\\n+[*#] == 1) \
69 .CPTN Rainbow Colors \[em] Nested Tables with Colored Borders \
75 .ctab \n[*n] 1 \En[#cc]u 0 \" red -> yellow
76 .ctab \n[*n] 1-\En[#cc]u 1 0 \" yellow -> green
77 .ctab \n[*n] 0 1 \En[#cc]u \" green -> cyan
78 .ctab \n[*n] 0 1-\En[#cc]u 1 \" cyan -> blue
79 .ctab \n[*n] \En[#cc]u 0 1 \" blue -> magenta
80 .ctab \n[*n] 1 0 1-\En[#cc]u \" magenta -> red
86 .\" 466MHz Celeron CPU, 384MB RAM
87 .\" WindowsXP/cygwin groff18.1: 11/10s
88 .\" WindowsXP/cygwin groff19.2: 57/55s
89 .\" Suse Linux 9.3 groff19.2: 8/8s