Maybe.
The X.org man page on Color Names says:
X supports the use of abstract color names, for example, "red", "blue". A value for this abstract name is obtained by searching one or more color name databases. Xlib first searches zero or more client-side databases; the number, location, and content of these databases is implementation dependent. If the name is not found, the color is looked up in the X server’s database.
On the client side, if the server is built with XCMS support, XLookupColor reads the colorspace definitions from Xcms.txt, which contains definitions that look like this:
XCMS_COLORDB_START 0.1 cms red CIEXYZ:0.3811/0.2073/0.0213 cms green CIEXYZ:0.3203/0.6805/0.1430 cms blue CIEXYZ:0.2483/0.1122/1.2417 XCMS_COLORDB_END
Without XCMS (or with XCMS but no match on name), the client sends the request to the server, which initialized its color table by looping over a static table to pre-allocate the colors built from an upstream app. There is no code that triggers the reallocation of colors at run-time.
It's been this way for a while: X.org removed support for an external rgb.txt file on 2007-11-05, and documented it on 2009-02-12.
In contemporary code, the total set of options appear to be:
- If your build has XCMS support, then you can use a named colorspace definition to approximate the behavior of
rgb.txt. This is the closest fit with the prior behavior. - You could poke the process memory and replace an allocated color with the desired color, but Hic sunt dragones.
- You could build the server yourself, extending the table with your definition or perhaps reverting the commit that removed
rgb.txt support. - You could lobby upstream to include your colors and hope they incorporate your PR.
/etc/X11/rgb.txtwhile Suse has moved the text file to/usr/share/X11/rgb.txt, possibly to underline the fact that the server doesn't read the color db from the filesystem., andXhas a command line option to dump its internal color database. So no, thank you but I'm not interested in the list or the internal database, I'd like to be able to install a new color in a running X server