pigment 0.1.0 → 0.1.1
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/lib/colors.rb +1 -1
 - data/lib/pigment.rb +7 -1
 - metadata +1 -1
 
    
        data/lib/colors.rb
    CHANGED
    
    | 
         @@ -256,7 +256,7 @@ module Pigment 
     | 
|
| 
       256 
256 
     | 
    
         
             
                self[:EgyptianBlue]                                             = '#1034A6'
         
     | 
| 
       257 
257 
     | 
    
         
             
                self[:ElectricBlue]                                             = '#7DF9FF'
         
     | 
| 
       258 
258 
     | 
    
         
             
                self[:ElectricCrimson]                                          = '#FF003F'
         
     | 
| 
       259 
     | 
    
         
            -
                self[:ElectricGreen, :GreenX11, :Lime, :LimeWeb] 
     | 
| 
      
 259 
     | 
    
         
            +
                self[:ElectricGreen, :Green, :GreenX11, :Lime, :LimeWeb]        = '#00FF00'
         
     | 
| 
       260 
260 
     | 
    
         
             
                self[:ElectricIndigo]                                           = '#6F00FF'
         
     | 
| 
       261 
261 
     | 
    
         
             
                self[:ElectricLime, :FluorescentYellow, :FrenchLime]            = '#CCFF00'
         
     | 
| 
       262 
262 
     | 
    
         
             
                self[:ElectricPurple]                                           = '#BF00FF'
         
     | 
    
        data/lib/pigment.rb
    CHANGED
    
    | 
         @@ -1,5 +1,5 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module Pigment
         
     | 
| 
       2 
     | 
    
         
            -
              VERSION = '0.1. 
     | 
| 
      
 2 
     | 
    
         
            +
              VERSION = '0.1.1'
         
     | 
| 
       3 
3 
     | 
    
         | 
| 
       4 
4 
     | 
    
         
             
              class Color
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
         @@ -249,6 +249,10 @@ module Pigment 
     | 
|
| 
       249 
249 
     | 
    
         
             
                  to_ints(with_alpha).map { |v| '%02x' % v }.join
         
     | 
| 
       250 
250 
     | 
    
         
             
                end
         
     | 
| 
       251 
251 
     | 
    
         | 
| 
      
 252 
     | 
    
         
            +
                def to_s
         
     | 
| 
      
 253 
     | 
    
         
            +
                  "Color(r=#{r}, g=#{g}, b=#{b}, a=#{a}#{", [h=#{h}, s=#{s}, l=#{l}]" if @hsl})"
         
     | 
| 
      
 254 
     | 
    
         
            +
                end
         
     | 
| 
      
 255 
     | 
    
         
            +
             
     | 
| 
       252 
256 
     | 
    
         
             
                alias_method :inv,           :inverse
         
     | 
| 
       253 
257 
     | 
    
         
             
                alias_method :invert,        :inverse
         
     | 
| 
       254 
258 
     | 
    
         
             
                alias_method :complementary, :inverse
         
     | 
| 
         @@ -257,6 +261,8 @@ module Pigment 
     | 
|
| 
       257 
261 
     | 
    
         
             
                alias_method :green,         :g
         
     | 
| 
       258 
262 
     | 
    
         
             
                alias_method :blue,          :b
         
     | 
| 
       259 
263 
     | 
    
         
             
                alias_method :alpha,         :a
         
     | 
| 
      
 264 
     | 
    
         
            +
                alias_method :to_a,          :to_floats
         
     | 
| 
      
 265 
     | 
    
         
            +
                alias_method :to_ary,        :to_floats
         
     | 
| 
       260 
266 
     | 
    
         
             
                alias_method :to_f,          :to_floats
         
     | 
| 
       261 
267 
     | 
    
         
             
              end
         
     | 
| 
       262 
268 
     | 
    
         
             
            end
         
     |