Colorkit

Built on Compass and Sass, Colorkit provides a sensible default color library along with additional functions and mixins that make generating harmonious color schemes a breeze.

Checkout the Colorkit Codepen to play with a live version, or read the docs.

Installation:

Install the Colorkit gem (you may need to run as sudo depending on your Ruby environment).

gem install colorkit

Run compass create specifying your project's directory (run compass create --help for further instructions).

compass create my_project_name -r colorkit --using colorkit

To use Colorkit in an existing project edit your project's config.rb file adding:

require 'colorkit'

What Is It?

Colorkit includes a color library, the core mixins and functions, and your project specific color pallet.

Color Library

Colorkit's default color library is based off the primary colors red, yellow, and blue keywords defined in SVG and referenced in the Level 3 CSS Color Module. Secondary and tertiary colors are derived in equal parts using Sass's color functions. Each of these key-colors are then used in Colorkit's tint-stack, tone-stack, and shade-stack functions to produce a value stack for each. The color swatches are given a variable named based of the BEM naming methodology, as defined here, in the form of:

$color-name--value-name

example:

$red-orange--shade-3;

Mixins and Functions

Colorkit includes mixins and functions for creating color schemes, color stacks, and experimenting entire pallets by automatically generating class names to use with the pallet template. Checkout the documentation for further information.

Color Pallet

The color-pallet.scss partial is the main settings file for using Colorkit and integrating it into your project. This is where you'll want to set all your color variables. Be sure to @include towards the top of your project's main stylesheet to be sure these variables are available project wide.

Credit

Color-stack functions were borrowed from Snugug's excellent toolkit which has now been moved over to the Team Sass GitHub.


License

© Kwale Design - Original source code dual licensed under MIT license / GPL2 license.