MCOLOR(7)
π¨ MCOLOR(7) β the color & reverse-video macro package (Macro Packages girlies rise π )
okay so bestie, listen. mcolor is a macro package for picking colors and doing reverse video printing on PostScript printers. That's the whole vibe. It plays nice with most existing macro packages (lowkey rare, highkey iconic) and it gives you exactly one macro to obsess over. Slay. β¨
πΈ SYNOPSIS πΈ
troff -mcolor [ options ] file ...
π DESCRIPTION π
mcolor is your macro package for color selection and reverse video printing on PostScript printers. It's compatible with most existing macro packages, and it ships with this one macro:
.CL color textβ prints text in color. If you give it no arguments at all, it restores the default color (which is black, in RGB color space β the classic, the moment, the blueprint π€). If you leave out text, the color you picked just stays in effect until you select another one. And if you give it two arguments, the text gets printed in color and then the default color is restored right after. Clean. Tidy. Periodt.
You can pick both the text color and the background color, btw β a color argument shaped like `color1 on color2` prints your text in color1 on top of a background in color2. It's giving layered lewk. π
Once a color is in effect, it gets re-installed at the top of every single output page. No cap β every page, every time. πβ¨
π¦ ARBITRARY POSTSCRIPT COLOR PARAMS π¦
You can set arbitrary PostScript color parameters by using color arguments like these:
red green blue rgbβ e.g.`.CL ".2 .3 .4 rgb"`hue saturation brightness hsbβ e.g.`.CL ".5 .6 .7 hsb"`cyan magenta yellow black cmykβ e.g.`.CL ".1 .2 .3 .4 cmyk"`gray setgrayβ e.g.`.CL ".5 setgray"`[$setcolorspace] comp1 comp2 ... compn setcolorβ where$setcolorspacemay be a PostScript procedure defined in the setup section using a\XΒ΄PSSetup: $setcolorspace { ... } bind defΒ΄'escape sequence. This parameter is required if the color space changes inside your document. Otherwise, it may be sufficient to just install the color space once in the setup section. iykyk π§
Every parameter has to be a number in the range between0.0and1.0, bestie. Watch those bounds. π
In the most general case, the value of the color argument is passed uninterpreted to the PostScript output. No thoughts, just vibes, straight through. π«
Named colors (RGB only, don't forget) must be listed in the colordict dictionary in the file /usr/share/heirloom-doctools/font/devpost/postscript/color.ps.
π FILES π
/usr/share/heirloom-doctools/tmac/color/usr/share/heirloom-doctools/font/devpost/postscript/color.ps
π SEE ALSO π
go give them a read, they're literally the supporting cast and they ate π«Ά
π NOTES π
Using the .CL macro isn't always the move, because it may β like every macro, fr fr β result in added spaces. π If that's a problem, you can use \XΒ΄SetColor: colorΒ΄ directly to dodge it entirely. Its color argument has exactly the same syntax as the first argument to .CL, e.g. \XΒ΄SetColor: .2 .3 .4 rgbΒ΄. Same energy, zero extra spaces. Iconic. β
mwah π that's the whole page β brought to you by the Heirloom Documentation Tools, dated 2/2/07, and forever filed under MCOLOR(7). now go make something pretty, bestie ππ¦π
π¦ where this page comes from
- alpine 3.24: heirloom-doctools-doc 191015-r6 Β· CDDL-1.1
- Copyright (C) 2003, Lucent Technologies Inc. and others
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms