-
Notifications
You must be signed in to change notification settings - Fork 942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support 256 colors #481
Support 256 colors #481
Conversation
This is awesome! A few comments:
|
Love it! Let's get the build passing? |
@thebigredgeek https://travis-ci.org/visionmedia/debug/jobs/262103770 <- re-run that test :) You have coveralls as a part of the pass/fail steps, and coveralls likes to fail from time to time, randomly. If you re-run it, it should pass. Unless coverage going down makes tests fail. In which case, a 0.1% decrease is a bit harsh to cause a failure, no? O.o @TooTallNate can do :) |
@TooTallNate I updated the colors to be color bounded so they look better on white backgrounds. |
Like #481, but for the web browser.
Like #481, but for the web browser.
Only having a select few colors gets old and can make certain namespace prefixes harder to read (especially when they have similar lengths and are the same color).
This PR enables 256 colors when both of the following are true:
supports-color
is availablerequire('supports-color').level >= 2
Otherwise, the color level falls back to the current selection of basic colors.
To generate the list of colors, I selected all ANSI 256 colors that satisfy the following requirements:
min
of the contrast against both white and black is no less than 1.5You can use the following script to experiment:
How I personally will be using this modification is to add
supports-color
to my dev dependencies since it's not required in production. Great for local development with no overhead in prod.