Juergen Spitzmueller wrote: > Angus Leeming wrote: >> LyX currently stores an 'X11 colour name' in LColor.[Ch]. Fortunately, >> you can generate it from the R,G,B triple... This code is currently in >> FormPreferences.C. Move it into Color.[Ch] and move these files into >> support. > > I see. Thanks for enlightening. Additionally, your proposed method for > calculating button shadow colors could go there too, then we may have > colored inset buttons. > BTW, is there an easy way to "invert" (?) a color, so that we could > calculate an appropriate (i.e. readable) button label color for a given > button color? (or chose dark or light text color depending on the > background)? > > Juergen.
<shrug>dunno</shrug> You could perhaps parse /usr/lib/X11/rgb.txt (location may vary). It has entries of the form: 255 250 250 snow 248 248 255 ghost white but really, I think that that is overkill. -- Angus