How to specify colors in unix?

The X Color Management System (Xcms) recognize color specifications in many different formats called color spaces.  Most of these formats reflect international standards. Under Xcms, each color specification has a prefix (some shorthand for the color space) and a numeric value. The following table summarizes the valid color spaces and their prefixes.
Name Prefix
Tektronix HVC TekHVC
Various CIE formats CIEXYZ, CIEuvY, CIExyY, CIELab, CIELuv
RGB RGB
RGB Intensity RGBi
Of the valid color spaces, the Tektronix HVC and the various CIE formats specify color in a device-independent manner. The RGB color spaces specify color that is hardware-specific. To take advantage of the portability of the X Color Management Systems, you will want to use TekHVC or any of the CIE formats. Xcms recognizes RGB specifications for compatibility with the older RGB color model.

When you create a shade with a color editor, such as xcoloredit or xtici, the program supplies you with a numeric color value in one or sometimes multiple formats. To specify the color under Xcms, you combine the numeric value with the appropriate prefix for the color space/format. The syntax is:
prefix: value1/value2/value3
The following are sample Xcms color specifications:
CIEuvY:0.15295/0.40507/0.44338
TekHVC:223.93036/72.45283/29.67013
RGB:6a/bb/d8
(Note that the Xcms color spaces are case insensitive)
the following is a command example:
xtem -fg RGB:62/bb/d9 &

Each RGB color has a numeric value associated with it. We can supply this number on the command line or in a resource file, prefixed with a pound sign (#), as in the following example:
xbiff -fg #09e5fb &

Have a Unix Problem
Do you have a UNIX Question?

Unix Books :-
UNIX Programming, Certification, System Administration, Performance Tuning Reference Books

Return to : - Unix System Administration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.
The site www.gotothings.com is in no way affiliated with or endorsed by any company listed at this site.
Any unauthorised copying or mirroring is prohibited.