colorkit 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +21 -0
- data/README.md +70 -0
- data/lib/colorkit.rb +3 -0
- data/stylesheets/_colorkit.scss +19 -0
- data/stylesheets/colorkit/_color-library.scss +20 -0
- data/stylesheets/colorkit/_color-scheme.scss +291 -0
- data/stylesheets/colorkit/_colorkit.scss +190 -0
- data/stylesheets/colorkit/color-library/_blue-greens.scss +43 -0
- data/stylesheets/colorkit/color-library/_blue-violets.scss +43 -0
- data/stylesheets/colorkit/color-library/_blues.scss +43 -0
- data/stylesheets/colorkit/color-library/_browns.scss +43 -0
- data/stylesheets/colorkit/color-library/_css3-color-keywords.scss +190 -0
- data/stylesheets/colorkit/color-library/_grays.scss +43 -0
- data/stylesheets/colorkit/color-library/_greens.scss +43 -0
- data/stylesheets/colorkit/color-library/_oranges.scss +43 -0
- data/stylesheets/colorkit/color-library/_red-oranges.scss +43 -0
- data/stylesheets/colorkit/color-library/_red-violets.scss +43 -0
- data/stylesheets/colorkit/color-library/_reds.scss +43 -0
- data/stylesheets/colorkit/color-library/_violets.scss +43 -0
- data/stylesheets/colorkit/color-library/_whites.scss +43 -0
- data/stylesheets/colorkit/color-library/_yellow-greens.scss +43 -0
- data/stylesheets/colorkit/color-library/_yellow-oranges.scss +43 -0
- data/stylesheets/colorkit/color-library/_yellows.scss +43 -0
- data/templates/project/_color-pallet.scss +106 -0
- data/templates/project/manifest.rb +3 -0
- data/templates/project/screen.scss +1 -0
- metadata +101 -0
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2013 Kwale Design, Sam Ashley
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
Colorkit
|
2
|
+
========
|
3
|
+
|
4
|
+
Built on Compass and Sass, Colorkit provides a sensible default color library
|
5
|
+
along with additional functions and mixins that make generating harmonious
|
6
|
+
color schemes a breeze.
|
7
|
+
|
8
|
+
Checkout the [Colorkit Codepen](http://codepen.io/kwaledesign/pen/glxBi) to play with a live version.
|
9
|
+
|
10
|
+
##Installation:
|
11
|
+
1. Download or clone the Colorkit repo
|
12
|
+
2. Install the Colorkit gem
|
13
|
+
```
|
14
|
+
sudo gem install colorkit
|
15
|
+
```
|
16
|
+
3. Run compass create specifying your project's directory (run compass create --help for further instructions).
|
17
|
+
```
|
18
|
+
compass create my_project_name -r colorkit --using colorkit
|
19
|
+
```
|
20
|
+
|
21
|
+
To use Colorkit in an existing project:
|
22
|
+
1. Download and install Colorkit
|
23
|
+
2. Edit your project's config.rb file adding:
|
24
|
+
```
|
25
|
+
require 'colorkit'
|
26
|
+
```
|
27
|
+
|
28
|
+
##What Is It?
|
29
|
+
Colorkit includes a color library, the core mixins and functions, and your
|
30
|
+
project specific color pallet.
|
31
|
+
|
32
|
+
###Color Library
|
33
|
+
Colorkit's default color library is based off the primary colors red, yellow,
|
34
|
+
and blue keywords [defined in
|
35
|
+
SVG](http://www.w3.org/TR/SVG/types.html#ColorKeywords) and referenced in the [Level 3 CSS Color
|
36
|
+
Module](http://www.w3.org/TR/css3-color/#svg-color). Secondary and tertiary colors are derived in equal parts using [Sass's
|
37
|
+
color
|
38
|
+
functions](http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html#mix-instance_method). Each of these key-colors are then used in Colorkit's
|
39
|
+
tint-stack, tone-stack, and shade-stack functions to produce a value stack for
|
40
|
+
each. The color swatches are given a variable named based of the
|
41
|
+
[BEM](http://bem.info/) naming
|
42
|
+
methodology, as defined [here](https://github.com/kwaledesign/CSS-Styleguide), in the form of:
|
43
|
+
```
|
44
|
+
$color-name--value-name
|
45
|
+
```
|
46
|
+
example:
|
47
|
+
|
48
|
+
```
|
49
|
+
$red-orange--shade-3;
|
50
|
+
```
|
51
|
+
###Mixins and Functions
|
52
|
+
Colorkit includes mixins and functions for creating color schemes, color
|
53
|
+
stacks, and experimenting entire pallets by automaticlly generating class names
|
54
|
+
to use with the pallet template. These are fairly well commented within the
|
55
|
+
source, hopefully documentation here will be updated soon.
|
56
|
+
|
57
|
+
###Color Pallet
|
58
|
+
The `color-pallet.scss` partial is the main settings file for using Colorkit
|
59
|
+
and integrating it into your project. This is where you'll want to set all your
|
60
|
+
color variables. Be sure to `@include` towards the top of your project's main
|
61
|
+
stylesheet to be sure these variables are available project wide.
|
62
|
+
|
63
|
+
###Credit
|
64
|
+
Color-stack functions were borrowed from [Snugug's](https://twitter.com/Snugug) excellent
|
65
|
+
[toolkit](https://github.com/Snugug/toolkit#colour-functions)
|
66
|
+
|
67
|
+
<hr>
|
68
|
+
### License
|
69
|
+
© Kwale Design - Original source code dual licensed under [MIT license](http://www.opensource.org/licenses/mit-license.php) / [GPL2 license](http://www.gnu.org/licenses/gpl-2.0.html). Open-sourced projects used within this project retain their original licenses.
|
70
|
+
|
data/lib/colorkit.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
@import "colorkit/colorkit";
|
2
|
+
@import "colorkit/color-library";
|
3
|
+
@import "colorkit/color-scheme";
|
4
|
+
|
5
|
+
@import "colorkit/color-library/blue-greens";
|
6
|
+
@import "colorkit/color-library/blue-violets";
|
7
|
+
@import "colorkit/color-library/blues";
|
8
|
+
@import "colorkit/color-library/browns";
|
9
|
+
@import "colorkit/color-library/greens";
|
10
|
+
@import "colorkit/color-library/grays";
|
11
|
+
@import "colorkit/color-library/oranges";
|
12
|
+
@import "colorkit/color-library/red-oranges";
|
13
|
+
@import "colorkit/color-library/red-violets";
|
14
|
+
@import "colorkit/color-library/reds";
|
15
|
+
@import "colorkit/color-library/violets";
|
16
|
+
@import "colorkit/color-library/yellow-greens";
|
17
|
+
@import "colorkit/color-library/yellow-oranges";
|
18
|
+
@import "colorkit/color-library/yellows";
|
19
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/**
|
2
|
+
* Colorkit Color Library
|
3
|
+
*
|
4
|
+
*/
|
5
|
+
|
6
|
+
@import "color-library/reds";
|
7
|
+
@import "color-library/red-oranges";
|
8
|
+
@import "color-library/oranges";
|
9
|
+
@import "color-library/yellow-oranges";
|
10
|
+
@import "color-library/yellows";
|
11
|
+
@import "color-library/yellow-greens";
|
12
|
+
@import "color-library/greens";
|
13
|
+
@import "color-library/blue-greens";
|
14
|
+
@import "color-library/blues";
|
15
|
+
@import "color-library/blue-violets";
|
16
|
+
@import "color-library/violets";
|
17
|
+
@import "color-library/red-violets";
|
18
|
+
@import "color-library/browns";
|
19
|
+
@import "color-library/grays";
|
20
|
+
|
@@ -0,0 +1,291 @@
|
|
1
|
+
/**
|
2
|
+
* Color Scheme Pallet
|
3
|
+
*
|
4
|
+
* for experimenting with color in the browser
|
5
|
+
*
|
6
|
+
* generates monochromatic, complementary, split-complementary, triadic,
|
7
|
+
* analogous, double-complementary, tetradic, and quadradic color-schemes along
|
8
|
+
* with (six by default) tints, tones, and shades of each color in your scheme.
|
9
|
+
* These colors are given class names automaticly.
|
10
|
+
*
|
11
|
+
* Remember: the first value in the $tint-stack, $tone-stack, and $shade-stack
|
12
|
+
* lists is the unadjusted color, meaning each stack includes the color which the
|
13
|
+
* stack was derived from. The adjusted colors in the stack begin at 2.
|
14
|
+
*/
|
15
|
+
|
16
|
+
@mixin color-scheme-pallet($key-color: red) {
|
17
|
+
$base-color: $key-color;
|
18
|
+
/**
|
19
|
+
* Monochromatic Color Scheme
|
20
|
+
*/
|
21
|
+
.monochromatic {
|
22
|
+
@include color-scheme(monochromatic, $key-color);
|
23
|
+
.pure-color-swatch { background: $base-color; }
|
24
|
+
.base {
|
25
|
+
$tint-stack: tint-stack($base-color, $sixths);
|
26
|
+
@include swatch-gen($tint-stack, tint);
|
27
|
+
$tone-stack: tone-stack($base-color,$sixths);
|
28
|
+
@include swatch-gen($tone-stack, tone);
|
29
|
+
$shade-stack: shade-stack($base-color, $sixths);
|
30
|
+
@include swatch-gen($shade-stack, shade);
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
/**
|
35
|
+
* Complementary Color Scheme
|
36
|
+
*/
|
37
|
+
.complementary {
|
38
|
+
@include color-scheme(complementary, $key-color);
|
39
|
+
.base .pure-color-swatch { background: $base-color; }
|
40
|
+
.complementary .pure-color-swatch { background: $complementary; }
|
41
|
+
.base {
|
42
|
+
$tint-stack: tint-stack($base-color, $sixths);
|
43
|
+
@include swatch-gen($tint-stack, tint);
|
44
|
+
$tone-stack: tone-stack($base-color,$sixths);
|
45
|
+
@include swatch-gen($tone-stack, tone);
|
46
|
+
$shade-stack: shade-stack($base-color, $sixths);
|
47
|
+
@include swatch-gen($shade-stack, shade);
|
48
|
+
}
|
49
|
+
.complementary {
|
50
|
+
$tint-stack: tint-stack($complementary, $sixths);
|
51
|
+
@include swatch-gen($tint-stack, tint);
|
52
|
+
$tone-stack: tone-stack($complementary, $sixths);
|
53
|
+
@include swatch-gen($tone-stack, tone);
|
54
|
+
$shade-stack: shade-stack($complementary, $sixths);
|
55
|
+
@include swatch-gen($shade-stack, shade);
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
/**
|
60
|
+
* Split-Complementary Color Scheme
|
61
|
+
*/
|
62
|
+
.split-complementary {
|
63
|
+
@include color-scheme(split-complementary, $key-color);
|
64
|
+
.base .pure-color-swatch { background: $base-color; }
|
65
|
+
.secondaryA .pure-color-swatch { background: $secondaryA; }
|
66
|
+
.secondaryB .pure-color-swatch { background: $secondaryB; }
|
67
|
+
.base {
|
68
|
+
$tint-stack: tint-stack($base-color, $sixths);
|
69
|
+
@include swatch-gen($tint-stack, tint);
|
70
|
+
$tone-stack: tone-stack($base-color,$sixths);
|
71
|
+
@include swatch-gen($tone-stack, tone);
|
72
|
+
$shade-stack: shade-stack($base-color, $sixths);
|
73
|
+
@include swatch-gen($shade-stack, shade);
|
74
|
+
}
|
75
|
+
.secondaryA {
|
76
|
+
$tint-stack: tint-stack($secondaryA, $sixths);
|
77
|
+
@include swatch-gen($tint-stack, tint);
|
78
|
+
$tone-stack: tone-stack($secondaryA, $sixths);
|
79
|
+
@include swatch-gen($tone-stack, tone);
|
80
|
+
$shade-stack: shade-stack($secondaryA, $sixths);
|
81
|
+
@include swatch-gen($shade-stack, shade);
|
82
|
+
}
|
83
|
+
.secondaryB {
|
84
|
+
$tint-stack: tint-stack($secondaryB, $sixths);
|
85
|
+
@include swatch-gen($tint-stack, tint);
|
86
|
+
$tone-stack: tone-stack($secondaryB, $sixths);
|
87
|
+
@include swatch-gen($tone-stack, tone);
|
88
|
+
$shade-stack: shade-stack($secondaryB, $sixths);
|
89
|
+
@include swatch-gen($shade-stack, shade);
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
93
|
+
/**
|
94
|
+
* Triadic Color Scheme
|
95
|
+
*/
|
96
|
+
.triadic {
|
97
|
+
@include color-scheme(triadic, $key-color);
|
98
|
+
.base .pure-color-swatch { background: $base-color; }
|
99
|
+
.secondaryA .pure-color-swatch { background: $secondaryA; }
|
100
|
+
.secondaryB .pure-color-swatch { background: $secondaryB; }
|
101
|
+
.base {
|
102
|
+
$tint-stack: tint-stack($base-color, $sixths);
|
103
|
+
@include swatch-gen($tint-stack, tint);
|
104
|
+
$tone-stack: tone-stack($base-color,$sixths);
|
105
|
+
@include swatch-gen($tone-stack, tone);
|
106
|
+
$shade-stack: shade-stack($base-color, $sixths);
|
107
|
+
@include swatch-gen($shade-stack, shade);
|
108
|
+
}
|
109
|
+
.secondaryA {
|
110
|
+
$tint-stack: tint-stack($secondaryA, $sixths);
|
111
|
+
@include swatch-gen($tint-stack, tint);
|
112
|
+
$tone-stack: tone-stack($secondaryA, $sixths);
|
113
|
+
@include swatch-gen($tone-stack, tone);
|
114
|
+
$shade-stack: shade-stack($secondaryA, $sixths);
|
115
|
+
@include swatch-gen($shade-stack, shade);
|
116
|
+
}
|
117
|
+
.secondaryB {
|
118
|
+
$tint-stack: tint-stack($secondaryB, $sixths);
|
119
|
+
@include swatch-gen($tint-stack, tint);
|
120
|
+
$tone-stack: tone-stack($secondaryB, $sixths);
|
121
|
+
@include swatch-gen($tone-stack, tone);
|
122
|
+
$shade-stack: shade-stack($secondaryB, $sixths);
|
123
|
+
@include swatch-gen($shade-stack, shade);
|
124
|
+
}
|
125
|
+
}
|
126
|
+
|
127
|
+
/**
|
128
|
+
* Analogous Color Scheme
|
129
|
+
*/
|
130
|
+
.analogous{
|
131
|
+
@include color-scheme(analogous, $key-color);
|
132
|
+
.pure-color-swatch { background: $base-color; }
|
133
|
+
.secondaryA .pure-color-swatch { background: $secondaryA; }
|
134
|
+
.secondaryB .pure-color-swatch { background: $secondaryB; }
|
135
|
+
.base {
|
136
|
+
$tint-stack: tint-stack($base-color, $sixths);
|
137
|
+
@include swatch-gen($tint-stack, tint);
|
138
|
+
$tone-stack: tone-stack($base-color,$sixths);
|
139
|
+
@include swatch-gen($tone-stack, tone);
|
140
|
+
$shade-stack: shade-stack($base-color, $sixths);
|
141
|
+
@include swatch-gen($shade-stack, shade);
|
142
|
+
}
|
143
|
+
.secondaryA {
|
144
|
+
$tint-stack: tint-stack($secondaryA, $sixths);
|
145
|
+
@include swatch-gen($tint-stack, tint);
|
146
|
+
$tone-stack: tone-stack($secondaryA, $sixths);
|
147
|
+
@include swatch-gen($tone-stack, tone);
|
148
|
+
$shade-stack: shade-stack($secondaryA, $sixths);
|
149
|
+
@include swatch-gen($shade-stack, shade);
|
150
|
+
}
|
151
|
+
.secondaryB {
|
152
|
+
$tint-stack: tint-stack($secondaryB, $sixths);
|
153
|
+
@include swatch-gen($tint-stack, tint);
|
154
|
+
$tone-stack: tone-stack($secondaryB, $sixths);
|
155
|
+
@include swatch-gen($tone-stack, tone);
|
156
|
+
$shade-stack: shade-stack($secondaryB, $sixths);
|
157
|
+
@include swatch-gen($shade-stack, shade);
|
158
|
+
}
|
159
|
+
}
|
160
|
+
|
161
|
+
/**
|
162
|
+
* Double Complementary Color Scheme
|
163
|
+
*/
|
164
|
+
.double-complementary {
|
165
|
+
@include color-scheme(double-complementary, $key-color);
|
166
|
+
.base .pure-color-swatch { background: $base-color; }
|
167
|
+
.secondaryA .pure-color-swatch { background: $secondaryA; }
|
168
|
+
.secondaryB .pure-color-swatch { background: $secondaryB; }
|
169
|
+
.complementary .pure-color-swatch { background: $complementary; }
|
170
|
+
.base {
|
171
|
+
$tint-stack: tint-stack($base-color, $sixths);
|
172
|
+
@include swatch-gen($tint-stack, tint);
|
173
|
+
$tone-stack: tone-stack($base-color,$sixths);
|
174
|
+
@include swatch-gen($tone-stack, tone);
|
175
|
+
$shade-stack: shade-stack($base-color, $sixths);
|
176
|
+
@include swatch-gen($shade-stack, shade);
|
177
|
+
}
|
178
|
+
.secondaryA {
|
179
|
+
$tint-stack: tint-stack($secondaryA, $sixths);
|
180
|
+
@include swatch-gen($tint-stack, tint);
|
181
|
+
$tone-stack: tone-stack($secondaryA, $sixths);
|
182
|
+
@include swatch-gen($tone-stack, tone);
|
183
|
+
$shade-stack: shade-stack($secondaryA, $sixths);
|
184
|
+
@include swatch-gen($shade-stack, shade);
|
185
|
+
}
|
186
|
+
.secondaryB {
|
187
|
+
$tint-stack: tint-stack($secondaryB, $sixths);
|
188
|
+
@include swatch-gen($tint-stack, tint);
|
189
|
+
$tone-stack: tone-stack($secondaryB, $sixths);
|
190
|
+
@include swatch-gen($tone-stack, tone);
|
191
|
+
$shade-stack: shade-stack($secondaryB, $sixths);
|
192
|
+
@include swatch-gen($shade-stack, shade);
|
193
|
+
}
|
194
|
+
.complementary {
|
195
|
+
$tint-stack: tint-stack($complementary, $sixths);
|
196
|
+
@include swatch-gen($tint-stack, tint);
|
197
|
+
$tone-stack: tone-stack($complementary, $sixths);
|
198
|
+
@include swatch-gen($tone-stack, tone);
|
199
|
+
$shade-stack: shade-stack($complementary, $sixths);
|
200
|
+
@include swatch-gen($shade-stack, shade);
|
201
|
+
}
|
202
|
+
}
|
203
|
+
|
204
|
+
/**
|
205
|
+
* Tetradic Color Scheme
|
206
|
+
*/
|
207
|
+
.tetradic {
|
208
|
+
@include color-scheme(tetradic, $key-color);
|
209
|
+
.base .pure-color-swatch { background: $base-color; }
|
210
|
+
.secondaryA .pure-color-swatch { background: $secondaryA; }
|
211
|
+
.secondaryB .pure-color-swatch { background: $secondaryB; }
|
212
|
+
.complementary .pure-color-swatch { background: $complementary; }
|
213
|
+
.base {
|
214
|
+
$tint-stack: tint-stack($base-color, $sixths);
|
215
|
+
@include swatch-gen($tint-stack, tint);
|
216
|
+
$tone-stack: tone-stack($base-color,$sixths);
|
217
|
+
@include swatch-gen($tone-stack, tone);
|
218
|
+
$shade-stack: shade-stack($base-color, $sixths);
|
219
|
+
@include swatch-gen($shade-stack, shade);
|
220
|
+
}
|
221
|
+
.secondaryA {
|
222
|
+
$tint-stack: tint-stack($secondaryA, $sixths);
|
223
|
+
@include swatch-gen($tint-stack, tint);
|
224
|
+
$tone-stack: tone-stack($secondaryA, $sixths);
|
225
|
+
@include swatch-gen($tone-stack, tone);
|
226
|
+
$shade-stack: shade-stack($secondaryA, $sixths);
|
227
|
+
@include swatch-gen($shade-stack, shade);
|
228
|
+
}
|
229
|
+
.secondaryB {
|
230
|
+
$tint-stack: tint-stack($secondaryB, $sixths);
|
231
|
+
@include swatch-gen($tint-stack, tint);
|
232
|
+
$tone-stack: tone-stack($secondaryB, $sixths);
|
233
|
+
@include swatch-gen($tone-stack, tone);
|
234
|
+
$shade-stack: shade-stack($secondaryB, $sixths);
|
235
|
+
@include swatch-gen($shade-stack, shade);
|
236
|
+
}
|
237
|
+
.complementary {
|
238
|
+
$tint-stack: tint-stack($complementary, $sixths);
|
239
|
+
@include swatch-gen($tint-stack, tint);
|
240
|
+
$tone-stack: tone-stack($complementary, $sixths);
|
241
|
+
@include swatch-gen($tone-stack, tone);
|
242
|
+
$shade-stack: shade-stack($complementary, $sixths);
|
243
|
+
@include swatch-gen($shade-stack, shade);
|
244
|
+
}
|
245
|
+
}
|
246
|
+
|
247
|
+
/**
|
248
|
+
* Quadradic Color Scheme
|
249
|
+
*/
|
250
|
+
.quadradic {
|
251
|
+
@include color-scheme(quadradic, $key-color);
|
252
|
+
.base .pure-color-swatch { background: $base-color; }
|
253
|
+
.secondaryA .pure-color-swatch { background: $secondaryA; }
|
254
|
+
.secondaryB .pure-color-swatch { background: $secondaryB; }
|
255
|
+
.complementary .pure-color-swatch { background: $complementary; }
|
256
|
+
.base {
|
257
|
+
$tint-stack: tint-stack($base-color, $sixths);
|
258
|
+
@include swatch-gen($tint-stack, tint);
|
259
|
+
$tone-stack: tone-stack($base-color,$sixths);
|
260
|
+
@include swatch-gen($tone-stack, tone);
|
261
|
+
$shade-stack: shade-stack($base-color, $sixths);
|
262
|
+
@include swatch-gen($shade-stack, shade);
|
263
|
+
}
|
264
|
+
.secondaryA {
|
265
|
+
$tint-stack: tint-stack($secondaryA, $sixths);
|
266
|
+
@include swatch-gen($tint-stack, tint);
|
267
|
+
$tone-stack: tone-stack($secondaryA, $sixths);
|
268
|
+
@include swatch-gen($tone-stack, tone);
|
269
|
+
$shade-stack: shade-stack($secondaryA, $sixths);
|
270
|
+
@include swatch-gen($shade-stack, shade);
|
271
|
+
}
|
272
|
+
.secondaryB {
|
273
|
+
$tint-stack: tint-stack($secondaryB, $sixths);
|
274
|
+
@include swatch-gen($tint-stack, tint);
|
275
|
+
$tone-stack: tone-stack($secondaryB, $sixths);
|
276
|
+
@include swatch-gen($tone-stack, tone);
|
277
|
+
$shade-stack: shade-stack($secondaryB, $sixths);
|
278
|
+
@include swatch-gen($shade-stack, shade);
|
279
|
+
}
|
280
|
+
.complementary {
|
281
|
+
$tint-stack: tint-stack($complementary, $sixths);
|
282
|
+
@include swatch-gen($tint-stack, tint);
|
283
|
+
$tone-stack: tone-stack($complementary, $sixths);
|
284
|
+
@include swatch-gen($tone-stack, tone);
|
285
|
+
$shade-stack: shade-stack($complementary, $sixths);
|
286
|
+
@include swatch-gen($shade-stack, shade);
|
287
|
+
}
|
288
|
+
}
|
289
|
+
|
290
|
+
}
|
291
|
+
|
@@ -0,0 +1,190 @@
|
|
1
|
+
/**
|
2
|
+
* Colorkit
|
3
|
+
*
|
4
|
+
*/
|
5
|
+
|
6
|
+
/**
|
7
|
+
* Color Stacks
|
8
|
+
*
|
9
|
+
* Returns a list of mixed colors at given intervals based on two initial source colors
|
10
|
+
* https://github.com/ericam/accoutrement/blob/master/stylesheets/accoutrement/_color.scss
|
11
|
+
*
|
12
|
+
* $main: The main color this stack is based on
|
13
|
+
* $second: The color to be mixed in at varrying amounts
|
14
|
+
* $amounts: Optional list of percentage mix intervals
|
15
|
+
*/
|
16
|
+
|
17
|
+
/**
|
18
|
+
* Amounts
|
19
|
+
*
|
20
|
+
* used in stack functions to create multiple color variants
|
21
|
+
*/
|
22
|
+
$default-amounts : 20% 40% 60% 70% 80% !default;
|
23
|
+
$sixths: 15% 30% 45% 60% 75% 90%;
|
24
|
+
|
25
|
+
$amounts : $default-amounts !default;
|
26
|
+
$default-tints : $default-amounts !default;
|
27
|
+
$default-shades : $default-amounts !default;
|
28
|
+
$default-tones : $default-amounts !default;
|
29
|
+
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Color Stack
|
33
|
+
*
|
34
|
+
* creates a list (color pallet) of color values based on the following arguments:
|
35
|
+
*
|
36
|
+
* $main: the color to generate variants from
|
37
|
+
* $second: the color to mix with $main to create the variants
|
38
|
+
* $amounts: the list of mixture amounts, determines the number of variants
|
39
|
+
*
|
40
|
+
* Remember: the first value in the stack is the unadjusted color, meaning each
|
41
|
+
* stack includes the color which the stack was derived from. The adjusted colors
|
42
|
+
* in the stack begin at 2.
|
43
|
+
*/
|
44
|
+
@function color-stack($main, $second, $amounts: $default-amounts) {
|
45
|
+
$stack: $main;
|
46
|
+
@each $amount in $amounts {
|
47
|
+
$stack: join($stack, mix($second, $main, $amount));
|
48
|
+
}
|
49
|
+
@return $stack;
|
50
|
+
}
|
51
|
+
|
52
|
+
/**
|
53
|
+
* Value Stacks
|
54
|
+
*
|
55
|
+
* Functions to return a tint/shade/tone stack based on a given color
|
56
|
+
*
|
57
|
+
* $color: color to adjust
|
58
|
+
* $amounts: optional list of percentage amounts
|
59
|
+
*/
|
60
|
+
|
61
|
+
// Tints
|
62
|
+
@function tint-stack($color, $amounts: $default-tints) {
|
63
|
+
@return color-stack($color, #fff, $amounts);
|
64
|
+
}
|
65
|
+
// Shades
|
66
|
+
@function shade-stack($color, $amounts: $default-shades) {
|
67
|
+
@return color-stack($color, #000, $amounts);
|
68
|
+
}
|
69
|
+
// Tones
|
70
|
+
@function tone-stack($color, $amounts: $default-tones) {
|
71
|
+
@return color-stack($color, #808080, $amounts);
|
72
|
+
}
|
73
|
+
|
74
|
+
/**
|
75
|
+
* Simple Color Value
|
76
|
+
*
|
77
|
+
* Functions to adjust the tint/shade/tone of a single color
|
78
|
+
*
|
79
|
+
* $color: color to adjust
|
80
|
+
* $amount: the percentage amount
|
81
|
+
*/
|
82
|
+
// Tint
|
83
|
+
@function tint($color, $amount) {
|
84
|
+
@return mix(#fff, $color, $amount);
|
85
|
+
}
|
86
|
+
// Shade
|
87
|
+
@function shade($color, $amount) {
|
88
|
+
@return mix(#000, $color, $amount);
|
89
|
+
}
|
90
|
+
// Tone
|
91
|
+
@function tone($color, $amount) {
|
92
|
+
@return mix(#808080, $color, $amount);
|
93
|
+
}
|
94
|
+
|
95
|
+
/**
|
96
|
+
* Gray Scale
|
97
|
+
*
|
98
|
+
* return opapue/alpha gray scale
|
99
|
+
*/
|
100
|
+
// gray-scale (opaque)
|
101
|
+
@function black($tint) {
|
102
|
+
@return lighten(#000, $tint);
|
103
|
+
}
|
104
|
+
|
105
|
+
@function white($shade) {
|
106
|
+
@return darken(#FFF, $shade);
|
107
|
+
}
|
108
|
+
|
109
|
+
// gray-scale (alpha)
|
110
|
+
@function alpha-black($opacity) {
|
111
|
+
@return rgba(0,0,0,$opacity);
|
112
|
+
}
|
113
|
+
|
114
|
+
@function alpha-white($opacity) {
|
115
|
+
@return rgba(255,255,255,$opacity);
|
116
|
+
}
|
117
|
+
|
118
|
+
/**
|
119
|
+
* Color-Scheme
|
120
|
+
*
|
121
|
+
* mixin to generate harmonious color-scheme variables
|
122
|
+
*
|
123
|
+
* $color-relationship: monochromatic, analogous, complementary, split-complementary, triadic, tetradic, quadradic
|
124
|
+
* $base-color: the color to initiate the color scheme with
|
125
|
+
* $color-angle: the degrees of seperation between colors on the wheel.
|
126
|
+
*
|
127
|
+
*/
|
128
|
+
|
129
|
+
// initialize variables
|
130
|
+
$complementary: null;
|
131
|
+
$secondaryA: null;
|
132
|
+
$secondaryB: null;
|
133
|
+
|
134
|
+
@mixin color-scheme(
|
135
|
+
$color-relationship: "monochromatic",
|
136
|
+
$base-color: red,
|
137
|
+
$color-angle: 30) {
|
138
|
+
@if $color-relationship == "monochromatic" {
|
139
|
+
$base-color: $base-color;
|
140
|
+
}
|
141
|
+
@if $color-relationship == "complementary" {
|
142
|
+
$complementary: complement($base-color);
|
143
|
+
}
|
144
|
+
@if $color-relationship == "split-complementary" {
|
145
|
+
$secondaryA: adjust-hue($base-color, 180 + $color-angle);
|
146
|
+
$secondaryB: adjust-hue($base-color, 180 - $color-angle);
|
147
|
+
}
|
148
|
+
@if $color-relationship == "double-complementary" {
|
149
|
+
$secondaryA: adjust-hue($base-color, $color-angle);
|
150
|
+
$secondaryB: complement($secondaryA);
|
151
|
+
$complementary: complement($base-color);
|
152
|
+
}
|
153
|
+
@if $color-relationship == "triadic" {
|
154
|
+
$secondaryA: adjust-hue($base-color, 120);
|
155
|
+
$secondaryB: adjust-hue($base-color, -120);
|
156
|
+
}
|
157
|
+
@if $color-relationship == "analogous" {
|
158
|
+
$secondaryA: adjust-hue($base-color, $color-angle);
|
159
|
+
$secondaryB: adjust-hue($base-color, - $color-angle);
|
160
|
+
}
|
161
|
+
@if $color-relationship == "tetradic" {
|
162
|
+
$secondaryA: adjust-hue($base-color, 300);
|
163
|
+
$secondaryB: complement($secondaryA);
|
164
|
+
$complementary: complement($base-color);
|
165
|
+
}
|
166
|
+
@if $color-relationship == "quadradic" {
|
167
|
+
$secondaryA: adjust-hue($base-color, 90);
|
168
|
+
$secondaryB: complement($secondaryA);
|
169
|
+
$complementary: complement($base-color);
|
170
|
+
}
|
171
|
+
}
|
172
|
+
|
173
|
+
/**
|
174
|
+
* Color Swatch Generator
|
175
|
+
*
|
176
|
+
* generates color swatch class names based on a given color list
|
177
|
+
* $color-swatches
|
178
|
+
*
|
179
|
+
* ex:
|
180
|
+
* $swatches: color-stack(red, blue, $default-amounts);
|
181
|
+
* @include swatch-gen($swatches);
|
182
|
+
*/
|
183
|
+
@mixin swatch-gen($color-swatches: null, $swatch-name: color-swatch) {
|
184
|
+
$n: length($color-swatches);
|
185
|
+
@while $n > 0 {
|
186
|
+
.#{$swatch-name}-#{$n} { background: nth($color-swatches, $n); }
|
187
|
+
$n: $n - 1;
|
188
|
+
}
|
189
|
+
}
|
190
|
+
|