ansi-colors icon indicating copy to clipboard operation
ansi-colors copied to clipboard

Fallback color when a given color (e.g. "bright" variants) are not available

Open rootwork opened this issue 4 years ago • 1 comments

If I chain colors like so:

colors.green.greenBright

will it fall-back to "green" if "greenBright" isn't available?

I wanted to test this myself, but wasn't sure how to force-disable "brights" in my terminal.

If this isn't possible it would be a nice feature to consider. I'm wary of using the brights when setting colors on a project that's going to be used by others, because I don't know what will happen if it's not available.

Thanks for maintaining this great package!

rootwork avatar May 19 '21 23:05 rootwork

It looks like https://github.com/sttk/ansi-colors-prioritized will allow me to accomplish this.

So you can close this unless you want to consider fallback colors within this project.

rootwork avatar May 25 '21 02:05 rootwork