0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

色弱者用のカラー設定(vim、ls、git)

Last updated at Posted at 2022-09-29

purpleとかredとかmagentとかよく見えないんです。涙
例えば、以下のbuild.sbtとかdatabase.confは、なにかあるのはわかりますが、まったく読めません。

ターミナルを使っていてよく使うツール(vim,git,ls)について軽減する設定を整理しました。

vim

~/.vimrc
colorscheme desert

lsの実行結果

Configuring LS_COLORS の 31(red),35(purple),36(cyan)を全て32(green)に変えてます。

Code Property
30 Black
31 Red
32 Green
33 Orange
34 Blue
35 Purple
36 Cyan
37 Grey
~/.bashrc
LS_COLORS='rs=0:di=01;34:ln=01;32:mh=00:pi=40;33:so=01;32:do=01;32:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;32:*.tgz=01;32:*.arj=01;32:*.taz=01;32:*.lzh=01;32:*.lzma=01;32:*.tlz=01;32:*.txz=01;32:*.zip=01;32:*.z=01;32:*.Z=01;32:*.dz=01;32:*.gz=01;32:*.lz=01;32:*.xz=01;32:*.bz2=01;32:*.bz=01;32:*.tbz=01;32:*.tbz2=01;32:*.tz=01;32:*.deb=01;32:*.rpm=01;32:*.jar=01;32:*.rar=01;32:*.ace=01;32:*.zoo=01;32:*.cpio=01;32:*.7z=01;32:*.rz=01;32:*.jpg=01;32:*.jpeg=01;32:*.gif=01;32:*.bmp=01;32:*.pbm=01;32:*.pgm=01;32:*.ppm=01;32:*.tga=01;32:*.xbm=01;32:*.xpm=01;32:*.tif=01;32:*.tiff=01;32:*.png=01;32:*.svg=01;32:*.svgz=01;32:*.mng=01;32:*.pcx=01;32:*.mov=01;32:*.mpg=01;32:*.mpeg=01;32:*.m2v=01;32:*.mkv=01;32:*.ogm=01;32:*.mp4=01;32:*.m4v=01;32:*.mp4v=01;32:*.vob=01;32:*.qt=01;32:*.nuv=01;32:*.wmv=01;32:*.asf=01;32:*.rm=01;32:*.rmvb=01;32:*.flc=01;32:*.avi=01;32:*.fli=01;32:*.flv=01;32:*.gl=01;32:*.dl=01;32:*.xcf=01;32:*.xwd=01;32:*.yuv=01;32:*.cgm=01;32:*.emf=01;32:*.axv=01;32:*.anx=01;32:*.ogv=01;32:*.ogx=01;32:*.aac=00;32:*.au=00;32:*.flac=00;32:*.mid=00;32:*.midi=00;32:*.mka=00;32:*.mp3=00;32:*.mpc=00;32:*.ogg=00;32:*.ra=00;32:*.wav=00;32:*.axa=00;32:*.oga=00;32:*.spx=00;32:*.xspf=00;32:';

Gitコマンドの出力結果

How to color the Git console? - Stack Overflowmagenta,red,cyanyellow reverseに変えてます。

~/.gitconfig
[color]
    ui = auto
[color "branch"]
    current = yellow reverse
    local = yellow
    remote = green
[color "diff"]
    meta = yellow bold
    frag = yellow reverse bold
    old = yellow reverse bold
    new = green bold
[color "status"]
    added = yellow
    changed = green
    untracked = yellow reverse

追記

色弱の人もそうでない人も以下のようなモヤモヤを感じると思います。

  • どの系統の色弱でも対応できる色使いってないの?
  • 赤系を違う色に置き換えないで視認できる方法ないの?

その答えを @TyaoiB さんがご案内してくださいました。

詳細は、「色盲の人にもわかるバリアフリープレゼンテーション法」 をご覧いただくとして、結論だけ記載しておくと、、、

Q.どの系統の色弱でも対応できる色使いってないの?

限られた種類の色を区別させるのであれば、
使用する色を工夫することで全てのタイプの色盲に対応が可能です。
例えば、我々は赤と緑の色の組み合わせのかわりに、
赤紫と緑の組み合わせを使うよう提唱しています

Q.赤系を違う色に置き換えないで視認できる方法ないの?

赤を使用する場合は「濃い赤」(#FF0000)を使わずに、より短波長側の「朱 色」(例えば#FF2000)や、
白を加えた「明るい赤」(例えば#FF1414)を使用すると黒と識別しやすくなり(図6参照)、
暗い背景の中でも図形や文字を視認できるようになります。

Image from Gyazo

@TyaoiB さん、コメント&有用情報のご案内ありがとうございました。m(_ _)m

0
1
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?