altercation / vim-colors-solarized

precision colorscheme for the vim text editor
http://ethanschoonover.com/solarized
6.59k stars 1.76k forks source link

Fix color under Windows Console #150

Closed brglng closed 2 years ago

brglng commented 8 years ago

Hi Solarized developer,

I would like to propose my fix of Solarized for Vim under Windows Console.

Windows Consolse uses a different color map from *nix's (:h dos-colors), but they can be easily mapped to each other:

NR  CMD           POWERSHELL   TERMCOL/16    SOLARIZED
--  ------------  -----------  ------------  ---------
 0  Black         Black         0 black      base02
 1  Blue          DarkBlue      4 blue       blue
 2  Green         DarkGreen     2 green      green
 3  Aqua          DarkCyan      6 cyan       cyan
 4  Red           DarkRed       1 red        red
 5  Purple        DarkMagenta   5 magenta    magenta
 6  Yellow        DarkYellow    3 yellow     yellow
 7  White         Gray          7 white      base2
 8  Gray          DarkGray      8 brblack    base03
 9  Light Blue    Blue         12 brblue     base0
10  Light Green   Green        10 brgreen    base01
11  Light Aqua    Cyan         14 brcyan     base1
12  Light Red     Red           9 brred      orange
13  Light Purple  Magenta      13 brmagenta  violet
14  Light Yellow  Yellow       11 bryellow   base00
15  Bright White  White        15 brwhite    base3

Thus, Solarized should use a different map to support Windows Console.

In addition, I also created my port of Solarized for Windows Console: https://github.com/brglng/windows-console-color-solarized. If I use the register settings in my port, and also apply this fix, I can get correct colors under Windows Console. I have proposed this port in https://github.com/altercation/solarized/issues/341.

Thanks and best regards!