XCOLORS(1)

πŸ“¦ version 91.10.4, in opensuse-leap 16.0

πŸ’– XCOLORS(1) πŸ’–

okay so bestie, welcome to the xcolors page β€” it lives in the General Commands Manual section of your fave manual collection, and it's literally about showing off every color name your X server knows 🌈


✨ NAME ✨

xcolors β€” display all X11 color names and colors 🎨


πŸ¦‹ SYNOPSIS πŸ¦‹

xcolors [ -start color ] [ -near color ] [ -distance howfar ]

🌸 DESCRIPTION 🌸

So xcolors reads the rgb.txt file β€” the one that defines all the color names your X server knows β€” and then displays all the colors it finds. that's it, that's the vibe πŸ’…

At the top of the window there's a sample region with text in it. Click on any of the color names and the color of that sample text changes, like magic ✨ Mouse button 1 changes the foreground; button 2 changes the background. You can also edit the text itself, no cap.

And when you're done? Just type q and the program exits. periodt. πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

On top of the usual X Toolkit options, xcolors understands these command line options:

  • -start name β€” specify a color name to start with; colors that come before this one in the rgb.txt file get skipped entirely πŸ™ˆ this one's a lifesaver if there are more colors than will fit on your screen or in your colormap.
  • -rgbfile filename β€” specify an alternate color database file to read. custom database, custom vibes πŸ’œ
  • -near nearcolor β€” only show colors near this one in the RGB space. All colors within a sphere in the RGB-space centered on nearcolor are displayed. it's giving "give me the neighbors" 🫢
  • -distance howfar β€” defines how close colors have to be to nearcolor to be displayed. This option sets the radius of the sphere used by the -near option. The scale is such that the RGB cube is 256 units on a side. The default is 64. πŸ”₯

🧚 ACTIONS 🧚

  • set-foreground([color]) β€” Set the foreground color of the sample region. If no color is provided, the color is taken from the border color of the widget where the action occurred. sneaky but iconic πŸ’…
  • set-background([color]) β€” Same as set-foreground() but sets the background color. twin behavior, different job πŸŽ€
  • quit() β€” Exit xcolors. bye bestie πŸ‘‹

⭐ RESOURCES ⭐

Xcolors has a few top-level application resources that allow customizations that are specific to xcolors:

  • startColor (class StartColor) β€” See the -start option.
  • rgbFile (class RgbFile) β€” See the -rgbfile option.
  • nearColor (class NearColor) β€” See the -near option.
  • nearDistance (class NearDistance) β€” See the -distance option.

🌈 WIDGET HIERARCHY 🌈

Knowing the name and position in the hierarchy of each widget is useful when specifying resources for them. In the chart below, the class and name of each widget is given. iykyk 🫢

Xcolors xcolors
     Paned panes
          AsciiText sample
          Viewport viewport
               Box colors
                    Label colorname
                    Label colorname
                    .
                    .
                    .

πŸ’€ FILES πŸ’€

  • /usr/lib/X11/rgb.txt β€” X color names and values. the source of truth fr fr πŸ“

πŸ™ˆ BUGS πŸ™ˆ

  • Assumes that all names for the same color are consecutive in the rgb.txt file. that's the assumption, bestie, don't come for her 😭
  • Because xcolors cannot read the server's color name database, the color names it uses may not match those in the server. This is most likely to happen if xcolors is run from a remote host. so like... remote-host behavior is a little chaotic, fair warning πŸ’€
  • The program would be faster if it used gadgets instead of widgets for the color spots. performance tea β˜• noted and documented.

πŸ‘‘ AUTHOR πŸ‘‘

Stephen Gildea, MIT X Consortium πŸ’–


and that's the whole page, babe πŸŽ€ this one's from X Version 11, dated 3 October 1991 β€” vintage in the best way, lowkey iconic, and honestly? it ate πŸŒŸπŸ’…βœ¨

πŸ“¦ where this page comes from