WSL(Windows Subsystem for Linux)はとても便利なのだが、青とか赤の文字が見にくい。
通常Ubuntuをインストールするとこんな色合い。
探してみると、MicrosoftがGithubにWindowsコンソールカラーツールを提供していることが分かった。
Introducing the Windows Console Colortool – Windows Command Line Tools For Developers
Githubはこちら。ブックマーク1ユーザしかいなかったので、オレもブックマークして2ユーザ目。
上に「Color Tool October 2018」下に「Color Tool Initial Release」がある。今回はColor Tool October 2018を選んでみた。zipをダウンロードして解凍。
このままColorTool.exeを実行しても何も起きない。cmd.exeで実行する。オプション無で実行するとこんな感じ。
C:\Users\Shigeo\Downloads\ColorTool>ColorTool.exe
Usage:
colortool.exe [options]
ColorTool is a utility for helping to set the color palette of the Windows Console.
By default, applies the colors in the specified .itermcolors or .ini file to the current console window.
This does NOT save the properties automatically. For that, you'll need to open the properties sheet and hit "Ok".
Included should be a `schemes/` directory with a selection of schemes of both formats for examples.
Feel free to add your own preferred scheme to that directory.
Arguments:
If that fails, it will look for it as an .ini file color scheme.
Options:
-?, --help : Display this help message
-c, --current : Print the color table for the currently applied scheme
-q, --quiet : Don't print the color table after applying
-d, --defaults : Apply the scheme to only the defaults in the registry
-b, --both : Apply the scheme to both the current console and the defaults.
-x, --xterm : Set the colors using VT sequences. Used for setting the colors in WSL.
Only works in Windows versions >= 17048.
-s, --schemes : Displays all available schemes
-v, --version : Display the version number
-o, --output
Available importers:
INI File Parser
concfg Parser
iTerm Parser
Introducing the Windows Console Colortool – Windows Command Line Tools For Developers から引用。
Included Schemes
The colortool will work with any .itermcolors scheme. We have also included some useful themes inside of the schemes folder for the tool. This tool makes it easier for users to change their color scheme based on their accessibility needs, and we are excited to promote that by adding a color scheme called deuteranopia targeted towards users who have trouble distinguishing red and green. Here's a description of each:
- campbell : The new default color scheme for Windows Console
- campbell-legacy : The first iteration of the campbell scheme
- cmd-legacy : The legacy defaults of the Windows Console
- OneHalfDark : A dark vim-airline theme by Son A. Pham
- OneHalfLight : A light vim-airline theme by Son A. Pham
- solarized_dark : The dark version of a popular color scheme by Ethan Schoonover
- solarized_light : The light version of a popular color scheme by Ethan Schoonover
- deuteranopia : A color scheme targeted towards making red and green clearer to users with red green colorblindness, and deuteranopia.
campbellを選んでみたが色が変わらない。今のデフォルトなので当然。実行コマンドはこれ。
ColorTool.exe -d campbell
campbell-legacyはこんな色。
cmd-legacyはこんな色。
OneHalfDarkはこんな色。次を試す。
OneHalfLightはこんな色。OneHalfLightとOneHalfDarkの違いはなんだろう。
solarized_darkはこんな感じ。うーん。
solarized_lightはこんな感じ。薄色系バックはいいんだけど、もうちょっとエッジの効いた奴は無いのかよ。
最後は deuteranopia。色覚異常者用で緑使ってないよというやつ。なんかこれはいいかも。
と、全部試し終わってしまった。結局黒バックだとコマンドプロンプトと間違えることもあるので、solarized_lightにする。ちょっと色は調整するかも。