color_lib 1.4.4 → 1.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +21 -1
- data/lib/color_lib/pantone.rb +732 -640
- data/lib/color_lib/rgb.rb +12 -8
- data/lib/color_lib/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1841b39104c8a980042d027661e1def4221a203b
|
4
|
+
data.tar.gz: 5c57402190933a54c00841f70d41db9ae10f17dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13c086130ceaaa8598db61cbc6ff01367cccf6687962be4fcd05639b0c4b4db471b60f42b7c7c3a0d73aa73d297927a0864b0e092fcc3e4c528a5415583c5877
|
7
|
+
data.tar.gz: 00eac91737d08ed59e71619dca68278f9ff42ffe1ee24f0e4ec26271d67ff2dbd90c5cd178b59dd0859f4116eb151e1e2d902a58672d24e9ab0ae31850c1f70b
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# ColorLib [![
|
1
|
+
# ColorLib [![Gem Version](https://badge.fury.io/rb/color_lib.svg)](http://badge.fury.io/rb/color_lib)
|
2
2
|
|
3
3
|
A lib for colors.
|
4
4
|
|
@@ -18,6 +18,26 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
$ gem install color_lib## Contributing
|
20
20
|
|
21
|
+
Usage
|
22
|
+
```ruby
|
23
|
+
ColorLib::RGB.new(r, g, b).html
|
24
|
+
ColorLib::RGB.new(60, 60, 60).html
|
25
|
+
=> "#3C3C3C"
|
26
|
+
|
27
|
+
ColorLib::CMYK.new(c, m, y, k).html
|
28
|
+
ColorLib::CMYK.new(68, 62, 61, 50).html
|
29
|
+
=> "#3C3C3C"
|
30
|
+
|
31
|
+
ColorLib::Pantone.from_value(pantone).html
|
32
|
+
ColorLib::Pantone.from_value('103').html
|
33
|
+
=> "#CAAD00"
|
34
|
+
|
35
|
+
ColorLib::Pantone.match(pantone)
|
36
|
+
ColorLib::Pantone.match('ABCDEF103')
|
37
|
+
=> false
|
38
|
+
```
|
39
|
+
|
40
|
+
|
21
41
|
1. Fork it ( https://github.com/brandfolder/color_lib/fork )
|
22
42
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
23
43
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|