Advanced Sass color utilities with chromatic-sass
Before diving into the details of chromatic-sass and the variety of things it can help you do, let’s take a look at one of the ways our existing color utilities often fail us: gradients.
Here’s a standard CSS gradient from
background-image: linear-gradient(red, teal);
Notice how in the middle, the colors look washed out, darker, and grayer than expected? Now take a look at the same gradient, also rendered in CSS and defined with one line of code, but generated using chromatic-sass:
background-image: chromatic-gradient(red, teal);
If you’re curious why the chromatic-sass generated gradient appears to be more natural and aesthetically pleasing, read on!
... read the whole story at blog.bugsnag.com.