104b94745Smrg! $XTermId: XTerm-col.ad,v 1.22 2009/08/15 15:56:29 tom Exp $
220d2c4d2Smrg! -----------------------------------------------------------------------------
320d2c4d2Smrg! this file is part of xterm
420d2c4d2Smrg!
520d2c4d2Smrg! Copyright 2002-2006,2009 by Thomas E. Dickey
620d2c4d2Smrg! 
720d2c4d2Smrg!                         All Rights Reserved
820d2c4d2Smrg! 
920d2c4d2Smrg! Permission is hereby granted, free of charge, to any person obtaining a
1020d2c4d2Smrg! copy of this software and associated documentation files (the
1120d2c4d2Smrg! "Software"), to deal in the Software without restriction, including
1220d2c4d2Smrg! without limitation the rights to use, copy, modify, merge, publish,
1320d2c4d2Smrg! distribute, sublicense, and/or sell copies of the Software, and to
1420d2c4d2Smrg! permit persons to whom the Software is furnished to do so, subject to
1520d2c4d2Smrg! the following conditions:
1620d2c4d2Smrg! 
1720d2c4d2Smrg! The above copyright notice and this permission notice shall be included
1820d2c4d2Smrg! in all copies or substantial portions of the Software.
1920d2c4d2Smrg! 
2020d2c4d2Smrg! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2120d2c4d2Smrg! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2220d2c4d2Smrg! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
2320d2c4d2Smrg! IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
2420d2c4d2Smrg! CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
2520d2c4d2Smrg! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
2620d2c4d2Smrg! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2720d2c4d2Smrg! 
2820d2c4d2Smrg! Except as contained in this notice, the name(s) of the above copyright
2920d2c4d2Smrg! holders shall not be used in advertising or otherwise to promote the
3020d2c4d2Smrg! sale, use or other dealings in this Software without prior written
3120d2c4d2Smrg! authorization.
3220d2c4d2Smrg! -----------------------------------------------------------------------------
33d522f475Smrg
34d522f475Smrg#include "XTerm"
35d522f475Smrg
36d522f475Smrg*VT100*colorMode: on
37d522f475Smrg*VT100*boldColors: on
38d522f475Smrg*VT100*dynamicColors: on
39d522f475Smrg
40d522f475Smrg! Uncomment this for "white" text on a dark background.
41d522f475Smrg!*VT100*foreground: gray90
42d522f475Smrg!*VT100*background: black
43d522f475Smrg
44d522f475Smrg! - OR -
45d522f475Smrg! Uncomment this for black text on a "white" background.
46d522f475Smrg!*VT100*foreground: black
47d522f475Smrg!*VT100*background: gray90
48d522f475Smrg
49d522f475Smrg! - OR -
50d522f475Smrg! leave the foreground/background colors alone (at the mercy of your desktop
51d522f475Smrg! designer).
52d522f475Smrg
53956cc18dSsnj! Color the popup/pulldown menu border to match the text widget foreground.
54d522f475Smrg!*SimpleMenu*borderColor: gray15
55d522f475Smrg
56d522f475Smrg! Uncomment this to use color for underline attribute
57d522f475Smrg!*VT100*colorULMode: on
58d522f475Smrg*VT100*colorUL: yellow
59d522f475Smrg
60d522f475Smrg!*VT100*italicULMode: on
61d522f475Smrg
62d522f475Smrg! Uncomment this to disable underlining, e.g., if colorULMode is set.
63d522f475Smrg!*VT100*underLine: off
64d522f475Smrg
65d522f475Smrg! Uncomment this to use color for the bold attribute
66d522f475Smrg!*VT100*colorBDMode: on
67d522f475Smrg*VT100*colorBD: white
68d522f475Smrg
69d522f475Smrg! Uncomment this to use the bold/underline colors in preference to other colors
70d522f475Smrg!*VT100*colorAttrMode: on
71d522f475Smrg
72d522f475Smrg! These are the 8 ANSI colors and their bright equivalents.  Depending on
73d522f475Smrg! other resource settings, xterm may use the bright colors when displaying
74d522f475Smrg! bold text (see the boldColors resource).
75d522f475Smrg*VT100*color0: black
76d522f475Smrg*VT100*color1: red3
77d522f475Smrg*VT100*color2: green3
78d522f475Smrg*VT100*color3: yellow3
79d522f475Smrg*VT100*color4: blue2
80d522f475Smrg*VT100*color5: magenta3
81d522f475Smrg*VT100*color6: cyan3
82d522f475Smrg*VT100*color7: gray90
83d522f475Smrg*VT100*color8: gray50
84d522f475Smrg*VT100*color9: red
85d522f475Smrg*VT100*color10: green
86d522f475Smrg*VT100*color11: yellow
87d522f475Smrg*VT100*color12: rgb:5c/5c/ff
88d522f475Smrg*VT100*color13: magenta
89d522f475Smrg*VT100*color14: cyan
90d522f475Smrg*VT100*color15: white
91d522f475Smrg
92d522f475Smrg! Disclaimer: there are no standard colors used in terminal emulation.
93d522f475Smrg!
94d522f475Smrg! The choice for color4 and color12 is a tradeoff between contrast, depending
95d522f475Smrg! on whether they are used for text or backgrounds.  Note that either color4 or
96d522f475Smrg! color12 would be used for text, while only color4 would be used for a
97d522f475Smrg! background.  These are treated specially, since the luminosity of blue is
98d522f475Smrg! only about half that of red/green, and is typically not accounted for in the
99d522f475Smrg! RGB scheme.
100d522f475Smrg!
101d522f475Smrg! Blue text on a black background should be readable.
102d522f475Smrg! Blue backgrounds should not be "too" bright.
103d522f475Smrg!
104d522f475Smrg! Originally color4/color12 were set to the names blue3/blue
105d522f475Smrg!*VT100*color4: blue3
106d522f475Smrg!*VT100*color12: blue
107d522f475Smrg!
108d522f475Smrg! They are from rgb.txt respectively:
109d522f475Smrg!  0   0 205		blue3
110d522f475Smrg!  0   0 255		blue
111d522f475Smrg! However, blue3 is not readable on a black background.
112d522f475Smrg!
113d522f475Smrg! Another choice was from the Debian settings:
114d522f475Smrg!*VT100*color4: DodgerBlue1
115d522f475Smrg!*VT100*color12: SteelBlue1
116d522f475Smrg!
117d522f475Smrg! From rgb.txt:
118d522f475Smrg! 30 144 255		DodgerBlue1
119d522f475Smrg! 99 184 255		SteelBlue1
120d522f475Smrg!
121d522f475Smrg! Some users object to this choice because the background (color4) is brighter
122d522f475Smrg! than they are accustomed.  Others point out that the different weights for
123d522f475Smrg! the red/green components make it appear to be not really blue.  Finally, it
124d522f475Smrg! provides poor contrast against color13 and color14.
125d522f475Smrg!
126d522f475Smrg! The current choice uses equal weights for red/green (effectively adding a
127d522f475Smrg! gray to the result).  It is brighter than the original choice, and provides
128d522f475Smrg! more contrast between color12 and color13, color14 than SteelBlue1 did.
129d522f475Smrg! Contrast of color4 against black is slightly improved over the original.
130d522f475Smrg!
131d522f475Smrg! Some refinement is certainly possible (you are welcome to try) -TD
132d522f475Smrg
133d522f475Smrg
134d522f475Smrg#if PLANES > 8
135d522f475Smrg! Color the popup menus and the menubar to match:
136d522f475Smrg*SimpleMenu*background: AntiqueWhite
137d522f475Smrg*SimpleMenu*foreground: gray15
138d522f475Smrg
139d522f475Smrg! Color the menubar to match:
140d522f475Smrg*Form.menubar.background: AntiqueWhite
141d522f475Smrg*Form.menubar*background: AntiqueWhite
142d522f475Smrg*Form.menubar.foreground: gray15
143d522f475Smrg*Form.menubar*foreground: gray15
144d522f475Smrg*Form.background: AntiqueWhite
145d522f475Smrg*form.background: AntiqueWhite
146d522f475Smrg
147d522f475Smrg! The following two sections take advantage of new features in version 7
148d522f475Smrg! of the Athena widget library.  Comment them out if you have a shallow
149d522f475Smrg! color depth.
150d522f475Smrg!*SimpleMenu*backgroundPixmap:   gradient:vertical?dimension=350&start=gray90&end=gray60
151d522f475Smrg!*SimpleMenu*foreground:         gray15
152d522f475Smrg
153d522f475Smrg!*VT100.scrollbar.thumb:         vlines2
154d522f475Smrg!*VT100.scrollbar.width:         14
155d522f475Smrg!*VT100.scrollbar.background:    gray60
156d522f475Smrg!*VT100.scrollbar.foreground:    rgb:a/5/5
157d522f475Smrg!*VT100.scrollbar.borderWidth:   0
158d522f475Smrg!*VT100.scrollbar.displayList:\
159d522f475Smrg!foreground      gray90;\
160d522f475Smrg!lines           1,-1,-1,-1,-1,1;\
161d522f475Smrg!foreground      gray60;\
162d522f475Smrg!lines           -1,0,0,0,0,-1
163d522f475Smrg#endif
164