color-schemer 0.1.1 → 0.1.2
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/color-schemer.gemspec +2 -2
 - data/stylesheets/_color-schemer.sass +11 -1
 - metadata +2 -2
 
    
        data/color-schemer.gemspec
    CHANGED
    
    | 
         @@ -2,7 +2,7 @@ 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            Gem::Specification.new do |s|
         
     | 
| 
       4 
4 
     | 
    
         
             
              s.name = %q{color-schemer}
         
     | 
| 
       5 
     | 
    
         
            -
              s.version = "0.1. 
     | 
| 
      
 5 
     | 
    
         
            +
              s.version = "0.1.2"
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
              s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5")
         
     | 
| 
       8 
8 
     | 
    
         
             
              s.authors = ["Scott Kellum", "Mason Wendell"]
         
     | 
| 
         @@ -18,7 +18,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       18 
18 
     | 
    
         
             
              s.homepage = %q{https://github.com/scottkellum/color-schemer}
         
     | 
| 
       19 
19 
     | 
    
         
             
              s.require_paths = ["lib"]
         
     | 
| 
       20 
20 
     | 
    
         
             
              s.rubyforge_project = %q{color-schemer}
         
     | 
| 
       21 
     | 
    
         
            -
              s.rubygems_version = %q{0.1. 
     | 
| 
      
 21 
     | 
    
         
            +
              s.rubygems_version = %q{0.1.2}
         
     | 
| 
       22 
22 
     | 
    
         
             
              s.summary = %q{Create color schemes with ease.}
         
     | 
| 
       23 
23 
     | 
    
         
             
              s.add_dependency(%q<compass>, ["~> 0.11"])
         
     | 
| 
       24 
24 
     | 
    
         
             
            end
         
     | 
| 
         @@ -14,6 +14,7 @@ $color-scheme: mono !default 
     | 
|
| 
       14 
14 
     | 
    
         
             
            $hue-offset: 20 !default
         
     | 
| 
       15 
15 
     | 
    
         
             
            $brightness-offset: 10% !default
         
     | 
| 
       16 
16 
     | 
    
         
             
            $color-theory: rgb !default
         
     | 
| 
      
 17 
     | 
    
         
            +
            $equalize: false !default
         
     | 
| 
       17 
18 
     | 
    
         | 
| 
       18 
19 
     | 
    
         
             
            // Normalizer credit to Mason Wendell: https://github.com/canarymason/The-Coding-Designers-Survival-Kit/blob/master/sass/partials/lib/variables/_color_schemes.sass
         
     | 
| 
       19 
20 
     | 
    
         
             
            @function equalize($color)
         
     | 
| 
         @@ -95,10 +96,19 @@ $color-theory: rgb !default 
     | 
|
| 
       95 
96 
     | 
    
         
             
                @return adjust-hue(invert($color), -57)
         
     | 
| 
       96 
97 
     | 
    
         
             
              @if $hue == 35
         
     | 
| 
       97 
98 
     | 
    
         
             
                @return adjust-hue(invert($color), -60)
         
     | 
| 
       98 
     | 
    
         
            -
             
     | 
| 
      
 99 
     | 
    
         
            +
             
     | 
| 
      
 100 
     | 
    
         
            +
            // Add percentage of white to a color
         
     | 
| 
      
 101 
     | 
    
         
            +
            @function tint($color, $percent)
         
     | 
| 
      
 102 
     | 
    
         
            +
              @return mix(white, $color, $percent)
         
     | 
| 
      
 103 
     | 
    
         
            +
             
     | 
| 
      
 104 
     | 
    
         
            +
            // Add percentage of black to a color
         
     | 
| 
      
 105 
     | 
    
         
            +
            @function shade($color, $percent)
         
     | 
| 
      
 106 
     | 
    
         
            +
              @return mix(black, $color, $percent)
         
     | 
| 
       99 
107 
     | 
    
         | 
| 
       100 
108 
     | 
    
         
             
            @function color-schemer($color-location, $base-color, $color-scheme, $hue-offset)
         
     | 
| 
       101 
109 
     | 
    
         
             
              // Primary, just return the base-color.
         
     | 
| 
      
 110 
     | 
    
         
            +
              @if $equalize
         
     | 
| 
      
 111 
     | 
    
         
            +
                $base-color: equalize($base-color)
         
     | 
| 
       102 
112 
     | 
    
         
             
              @if $color-location == primary
         
     | 
| 
       103 
113 
     | 
    
         
             
                @return $base-color
         
     | 
| 
       104 
114 
     | 
    
         
             
              // Secondary colors
         
     |