MCOLOR(7)

πŸ“¦ version 191015, in alpine 3.24

🎨 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 $setcolorspace may 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 between 0.0 and 1.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