Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 60 lines (40 sloc) 1.531 kb
af1e660 @imathis first commit
authored
1 # What is this?
2
3 Color Hacker is a handy little utility for helping you crack your color schemes using Sass color functions.
4 Simply pass the `hack-colors` function a list of colors and it will return a set of color functions that show
5 how all of the colors in the color scheme can be derived from the first color.
6
7 ## Example
8
9 ``` scss
10 @debug(hack-colors(#cff09e #a8dba8 #79bd9a #3b8686 #0b486b));
11 ```
12
13 Output:
14
15 ``` scss
16 $key: #cff09e;
17 $color-2: scale-color(adjust-hue($key, 36deg), $saturation: -43.367%, $lightness: -2.764%);
18 $color-3: scale-color(adjust-hue($key, 65deg), $saturation: -53.561%, $lightness: -22.111%);
19 $color-4: scale-color(adjust-hue($key, 96deg), $saturation: -46.923%, $lightness: -51.508%);
20 $color-5: scale-color(adjust-hue($key, 118deg), $saturation: 30.395%, $lightness: -70.352%);
21 ```
22
23
24 ## Setup
25
26 Install the plugin:
27
28 ``` sh
29 gem install color-hacker
30 ```
31
32 Add Color Hacker to your compass configuration file:
33
34 ``` rb
35 require 'color-hacker'
36 ```
37
38 ## Usage
39
40 `hack-colors` accepts two variables.
41
42 1. A space separated list of colors, e.g. (#fab #00face)
43 2. Optional: A function type, scale or adjust. Defaults to scale.
44
45 ``` scss
46 // Debug passes output to the terminal
47 @debug(hack-colors(#beaf0c #deac0b));
48
49 // Return adjust-color functions
50 @debug(hack-colors(#beaf0c #deac0b, scale));
51
52 ```
53
54 ## License
55 Copyright (c) 2008-2009 Brandon Mathis<br>
56 All Rights Reserved.<br>
57 Released under a [slightly modified MIT License][license].
58
59 [license]: http://github.com/imathis/color-hacker/tree/master/LICENSE.markdown
Something went wrong with that request. Please try again.