rgbcell 0.5 → 0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -7
  3. data/lib/rgbcell.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb2bf06b2bb1f5162249b2a5e02d1ec58ad4b35a7c4f172c30a3302f6ec36f99
4
- data.tar.gz: e3df58f700117a89c5e2183ec36f90859986f0567888923948439a49d1f65096
3
+ metadata.gz: da5fd72fb01b31511616620f70d832b1072f849650b67c42cbb299b46dbbeb6e
4
+ data.tar.gz: a7e51036067dc362f3bb3786f7d6601439cf1559542f6b717fdd314f65b815d5
5
5
  SHA512:
6
- metadata.gz: 5182f8c620e5bd05652efbc95c4cc75167a323b316e154c50fe4162a81758873e1157b92640a51cc8fd2cd978bf83744fd81c4f759b8337b2be28b869aacf82b
7
- data.tar.gz: d9aac83ce02fa07b1c92104cd8ee21e7fcd4c10c8bbd7da24a9fde624aa4e1b9016d0a2970d485148d72af9e2dbff20c8c8317631ed9cdbb12dcde24223c2721
6
+ metadata.gz: d5c5ba5b3f7fd671fa6b641d9ab82dfcd1e8ba6b3638a4f0526d922095e38bcbc3d7c20d3aa2b4d820db5abcf254a9469907180ebc9bf4ca8a723087e0b16df9
7
+ data.tar.gz: 6b4b772dd5689ea6d08ffa8eefb7ab26b67591414dc61351c14f2e7d086fce6fbd0abd3f81ae8f0febac4824a79e691f2d22697e3fa955f9d7e0f8ddbb25aada
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  RGBCell represents a color as the coordinates in the x-y-z coordinate system.
4
4
  Each of the three component color elements, red, green, and blue, have a float
5
- value from 0 to 256.
5
+ value from 0 to 255.
6
6
 
7
7
  Creating an object without any params creates black:
8
8
 
@@ -34,7 +34,10 @@ You can indicate the color using hex format:
34
34
  color.green #=> 255.0
35
35
  color.blue #=> 0.0
36
36
 
37
- You can give one of the HTML named colors:
37
+ You can give one of the HTML named colors. All 140 official named HTML colors
38
+ are available. See
39
+ [W3C's page](https://www.w3.org/wiki/CSS/Properties/color/keywords)
40
+ for the complete list.
38
41
 
39
42
  color = RGBCell.new('purple')
40
43
  color.to_s #=> #800080
@@ -42,7 +45,7 @@ You can give one of the HTML named colors:
42
45
  color.green #=> 0.0
43
46
  color.blue #=> 128.0
44
47
 
45
- Finally, you can use 'random' to get a random color:
48
+ You can use 'random' to get a random color:
46
49
 
47
50
  color = RGBCell.new('random')
48
51
  color.to_s #=> #dbd25b
@@ -50,8 +53,8 @@ Finally, you can use 'random' to get a random color:
50
53
  color.green #=> 210.0
51
54
  color.blue #=> 91.0
52
55
 
53
- You can also set each component color individually. Notice in this example that
54
- a component integer value is converted to float.
56
+ Finally, you can also set each component color individually. Notice in this
57
+ example that an integer value is converted to float.
55
58
 
56
59
  color = RGBCell.new()
57
60
  color.red = 60 #=> 60.0
@@ -63,7 +66,7 @@ a component integer value is converted to float.
63
66
 
64
67
  Because every color is a set of coordinates, the difference between two colors
65
68
  can be expressed as a distance. The distance is always zero or a positive
66
- number. For example, the following example gives the distance between red and
69
+ number. For example, the following code gives the distance between red and
67
70
  chartreuse.
68
71
 
69
72
  red = RGBCell.new('red')
@@ -116,4 +119,5 @@ mike@idocs.com
116
119
 
117
120
  | version | date | notes |
118
121
  |---------|---------------|-------------------------------------------------------|
119
- | 0.5 | June 25, 2020 | Initial upload. |
122
+ | 0.5 | June 25, 2020 | Initial upload. |
123
+ | 0.6 | June 26, 2020 | Edits to documentation. |
data/lib/rgbcell.rb CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  class RGBCell
9
9
  # version
10
- VERSION = '0.5'
10
+ VERSION = '0.6'
11
11
 
12
12
  #---------------------------------------------------------------------------
13
13
  # initialize
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rgbcell
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.5'
4
+ version: '0.6'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike O'Sullivan