XCOLORS(1)
π
XCOLORS β the xcolors page, bestie edition
okay so this is the manual for xcolors, a lil X11 program that shows you every color name your X server knows about. it lives in the General Commands Manual section (that's section 1, iykyk). grab a snack, we're going through the whole thing together π
β¨ NAME β¨
xcolors β display all X11 color names and colors
like. it shows you the names AND the actual colors. both. iconic behavior fr.
π SYNOPSIS π
xcolors [ -start color ] [ -near color ] [ -distance howfar ]
that's the whole vibe. three optional flags, no positional args, we love a low-maintenance queen π
π DESCRIPTION π
so what xcolors does is read the rgb.txt file β that's the file that defines all the color names the X server knows about β and then it displays the colors found. that's it. that's the whole thing. and honestly? slay.
At the top of the window there's a sample region containing text. like a little preview box, bestie. By clicking on the color names, the color of the sample text can be changed. so you click a color name, the sample text recolors itself, you go "ooooh" π
Mouse button 1 changes the foreground; button 2 changes the background. (button 3 is just standing there, minding its business, no cap.)
The text can also be edited! not just looked at. you can type in it. main character energy.
Typing `q` exits the program. lowercase q. that's your escape hatch πͺβ¨
π OPTIONS π
In addition to the usual X Toolkit options, xcolors understands these command line options:
-start nameβ specify a color name to start with; colors before this one in thergb.txtfile are skipped. This option is useful if there are more colors than will fit on your screen or in your colormap. (which, honestly, is a LOT of colors, so this is your little filter bestie π«Ά)-rgbfile filenameβ specify an alternate color database file to read. want to use a different color list? go off, be your own person.-near nearcolorβ only show colors near this one in the RGB space. All colors within a sphere in the RGB-space centered onnearcolorare displayed. yes, a sphere. in RGB space. geometry said gay rights π-distance howfarβ defines how close colors have to be tonearcolorto be displayed. This option sets the radius of the sphere used by the-nearoption. The scale is such that the RGB cube is 256 units on a side. The default is64.
π₯ ACTIONS π₯
these are the toolkit actions, for when you're out here writing your own resources and translations like a boss:
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.set-background([color])β Same asset-foreground()but sets the background color. (it's the same girl, different era π)quit()β Exitxcolors. bye bestie π
πΈ RESOURCES πΈ
Xcolors has a few top-level application resources that allow customizations that are specific to xcolors. so like, the glow-up options, but in your resource file:
startColor(classStartColor) β See the-startoption.rgbFile(classRgbFile) β See the-rgbfileoption.nearColor(classNearColor) β See the-nearoption.nearDistance(classNearDistance) β See the-distanceoption.
π¦ 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. so if you want to target ONE specific lil widget, this is your map πΊοΈβ¨
Xcolors xcolors
Paned panes
AsciiText sample
Viewport viewport
Box colors
Label colorname
Label colorname
.
.
.
see those dots at the bottom? yeah. it just keeps going. one Label colorname per color. it's giving infinite scroll before infinite scroll was a thing π
π§ FILES π§
/etc/X11/rgb.txtβ X color names and values. the sacred text. the source of truth. the girlies' bible ππ
π BUGS π
okay bestie, sit down, we gotta talk about the flaws. not me defending them, just reporting:
- Assumes that all names for the same color are consecutive in the
rgb.txtfile. so if your color file is chaotic and scattered? it's not gonna vibe with that. - Because
xcolorscannot 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 ifxcolorsis run from a remote host. so like, remote host shenanigans = name mismatch potential. watch out π« - The program would be faster if it used gadgets instead of widgets for the color spots. yeah. it's a little slow. it's doing its best. it's still cute though.
ngl these are real and documented, not me being dramatic. the manpage said it, I'm just saying it with more emoji. periodt.
π AUTHOR π
Stephen Gildea, MIT X Consortium β the actual legend who wrote this. respect the architect π«‘π
and that's the whole page, bestie!! this came from X Version 11, dated 3 October 1991 β yeah, she's an elder icon and she's still serving colors ππ stay colorful, don't let anyone tell you your colormap is too big πβ¨
π¦ where this page comes from
- debian trixie: xcolors 1.5a-10.1
- ubuntu noble: xcolors 1.5a-9build1
- ubuntu questing: xcolors 1.5a-12
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms