-
Book Overview & Buying
-
Table Of Contents
Mastering PostCSS for Web Design
By :
A challenge that any developer or designer will face is which color should be used on a site—a nice shade of red, or how about sea blue, for example? It doesn't matter whether they are responsible for choosing the shade to use, or if they have to pick the right RGB or HEX color to use.
Irrespective of where responsibilities lie, we still have to choose a color, and there is a good chance we won't be choosing one that comes from the default 256-color palette, but one that is likely to be a lighter or darker shade, or perhaps a mix of two colors:

Anyone used to working with SASS will already be aware of functions such as lighten(), darken() or saturate()—the great thing about PostCSS is that we can replicate similar functionality for those who want to move away from the dependency of SASS.
To see how easy it is to use, we're going to combine the power of two plugins for PostCSS—postcss-color-palette (available at https://github.com/zaim/postcss-color-palette...