color-schemer 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
data/lib/color-schemer.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
//////////////////////////////
|
2
|
+
// Color Is Dark
|
3
|
+
//
|
4
|
+
// Checks to see if the input color is a dark color taking into account both lightness and hue.
|
5
|
+
// Suitable for determining, for instance, if a background should have a dark or light text color.
|
6
|
+
// @return true/false (boolean)
|
7
|
+
//////////////////////////////
|
8
|
+
|
9
|
+
@function cs-is-dark($color) {
|
10
|
+
@if (lightness($color) < 60% and (hue($color) >= 210 or hue($color) <= 27)) or (lightness($color) <= 32%) {
|
11
|
+
@return true;
|
12
|
+
} @else {
|
13
|
+
@return false;
|
14
|
+
}
|
15
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: color-schemer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -57,6 +57,7 @@ files:
|
|
57
57
|
- stylesheets/color-schemer/_color-adjustments.scss
|
58
58
|
- stylesheets/color-schemer/_color-schemer.scss
|
59
59
|
- stylesheets/color-schemer/_colorblind.scss
|
60
|
+
- stylesheets/color-schemer/_comparison.scss
|
60
61
|
- stylesheets/color-schemer/_equalize.scss
|
61
62
|
- stylesheets/color-schemer/_interpolation.scss
|
62
63
|
- stylesheets/color-schemer/_mix.scss
|