facebookincubator / fastmod

A fast partial replacement for the codemod tool
Apache License 2.0
1.66k stars 41 forks source link

Use normal colors, not bright colors #24

Closed jez closed 3 years ago

jez commented 3 years ago

It looks like the colorterm library uses the Dark* prefix to mean "not-bright" colors (e.g., ANSI codes like 0;31m instead of 1;31m).

Using the 0; (not bright) variants will make this work with more color schemes. For example, many color schemes (like Solarized) use the bright colors to stash assorted shades of black and gray.

I'd prefer to change the default to the Dark* variants because I think that it will work out of the box better for most people and look good. But I'd also be open to adding a config option so that people could write something like

alias fastmod=fastmod --color-removed=XYZ --color-added=ABC

Thanks!

Before

Screen Shot 2021-03-02 at 1 14 46 PM

After

Screen Shot 2021-03-02 at 1 14 36 PM
swolchok commented 3 years ago

I did some research, and this makes sense to me. I originally thought based on https://github.com/altercation/solarized/issues/19#issuecomment-1048328 and https://github.com/huyz/irssi-colors-solarized that Solarized is out of line for making "bright green" mean something other than green, but then I found that git and hg both emit the non-bright colors by default, as does the original codemod. We should just match those tools.

facebook-github-bot commented 3 years ago

@swolchok merged this pull request in facebookincubator/fastmod@8dbb19caf1706068d3cefc4d50ce77f4de792ce1.