color-schemer 0.2.5 → 0.2.6

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.
@@ -4,7 +4,7 @@ Compass::Frameworks.register("color-schemer", :path => "#{File.dirname(__FILE__)
4
4
 
5
5
  module ColorSchemer
6
6
 
7
- VERSION = "0.2.5"
7
+ VERSION = "0.2.6"
8
8
  DATE = "2011-09-15"
9
9
 
10
10
  end
@@ -19,6 +19,8 @@ $cs-colorblind : normal !default;
19
19
  @import "color-schemer/color-adjustments";
20
20
  @import "color-schemer/color-schemer";
21
21
 
22
+ @import "_comparison.scss";
23
+
22
24
  @import "color-schemer/mixins";
23
25
 
24
26
  // Tell other files that this is loaded.
@@ -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.5
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