I have no prior experience with st other than using it, but from glancing at the source I think I have found the parts that are relevant.
I presumed that by use solarized colors you meant that you want all applications that use default blue to instead use solarized blue.
You will need to make some changes to the source in st.c rather than just config.h.
dc is a global variable that is an instance of the DC struct, each dc.cols[i]
corresponds to a color to use.
The first 16 colors within config.h
colorname are loaded via XAllocNamedcolor
within the function xloadcols(void)
, these are inserted into the first 16 positions (0 to 15) within dc.col
.
These correspond to ansi escape sequence colours, for more see ANSI Escape Code::Colors.
You would need to change this funtionality within xloadcols(void)
, specifically the first for loop.
Instead of using XAllocNamedColor
you could instead use XAllocColor
(you can see an example of this in the second for loop), this allows you to specify the rgb of each color to be inserted at each position (instead of loading an already known colour from a name).
For the hex values see solarized.vim specifically lines 98 through 116 where the hex values are specified.
The rest of dc.cols
is allocated within a for loop, also found within xloadcols(void)
, you probably shouldn't need to change this although it means some applications may use these colors rather than your solarized ones.
As for the default background and foreground colors these are set within config.h, lines 40 and below.
each #define name index
defines dc.col[index] is to be used for name, for example DefaultBg
specifies the background color of the terminal.