hex_color_generate 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a90d833cce24fbc0b170e16e44f0b826819dbc42093ad5f7453c9b7f899ed8be
4
- data.tar.gz: ef8eae0496eb32d480572363233456da5426b151bc67dd483086689de85eaba5
3
+ metadata.gz: a1f57b23435b1238ebf5c5b12aa2429493791f42cd3679a78ca5426ca902b413
4
+ data.tar.gz: 8a9b48e3352abd931c9bd0cbe414f86f7c156a8cf53ae53b99fb1affe7a97db4
5
5
  SHA512:
6
- metadata.gz: cf3cb29a996b74720b487bb608e6e2c1ac49eba86b40b34edd82a986db376f87a15ed61ca06159dea90f236a48c35ab0787cbe9490b9aeb87ad611638f1c7cbb
7
- data.tar.gz: f0ac7a2f3c029febd5c2147ee2391bf1a750411d35caa73649609fec17fe3099868feffbe0d731ab202a2222c8dd37001ed8101e949bfcf0e40b5a6311565a82
6
+ metadata.gz: f005ebe02833d2cbd2855bce30b8c24d4c8e7298a6bc314079a41642553cc21c9efdcd9a51ab6c8ab3b3f4375a09764120142e18a2f96fb710910b3bb2b1e95d
7
+ data.tar.gz: 751202d6fa975b9e94042bc11054abfdda995df3ad298107ca7d9289918aee40edeecd97adc5bffd086a6746ba039f083cf280903003ca530bfb1d6d64b28baf
Binary file
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = "This gem generate hexadecimal color"
13
13
  spec.homepage = "https://github.com/nemuba/hex_color_generate"
14
14
  spec.license = "MIT"
15
- spec.required_ruby_version = ">= 2.7.1"
15
+ spec.required_ruby_version = ">= 2.6"
16
16
 
17
17
  spec.metadata["homepage_uri"] = "https://github.com/nemuba/hex_color_generate"
18
18
  spec.metadata["source_code_uri"] = "https://github.com/nemuba/hex_color_generate/tree/main"
@@ -1,155 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "yaml"
4
+
3
5
  module HexColorGenerate
4
6
  module Colors
5
- COLORS = {
6
- red: {
7
- "indianred" => "cd5c5c",
8
- "lightcoral" => "f08080",
9
- "salmon" => "fa8072",
10
- "darksalmon" => "e9967a",
11
- "lightsalmon" => "ffa07a",
12
- "crimson" => "dc143c",
13
- "red" => "ff0000",
14
- "firebrick" => "b22222",
15
- "darkred" => "8b0000"
16
- },
17
- green: {
18
- "lime" => "00ff00",
19
- "limegreen" => "32cd32",
20
- "forestgreen" => "228b22",
21
- "green" => "008000",
22
- "darkgreen" => "006400"
23
- },
24
- blue: {
25
- "aqua" => "00ffff",
26
- "cyan" => "00ffff",
27
- "lightcyan" => "e0ffff",
28
- "paleturquoise" => "afeeee",
29
- "aquamarine" => "7fffd4",
30
- "turquoise" => "40e0d0",
31
- "mediumturquoise" => "48d1cc",
32
- "darkturquoise" => "00ced1",
33
- "lightseagreen" => "20b2aa",
34
- "cadetblue" => "5f9ea0",
35
- "darkcyan" => "008b8b",
36
- "teal" => "008080",
37
- "blue" => "0000ff",
38
- "mediumblue" => "0000cd",
39
- "darkblue" => "00008b",
40
- "navy" => "000080",
41
- "midnightblue" => "191970"
42
- },
43
- yellow: {
44
- "yellow" => "ffff00",
45
- "lightyellow" => "ffffe0",
46
- "lemonchiffon" => "fffacd",
47
- "lightgoldenrodyellow" => "fafad2",
48
- "papayawhip" => "ffefd5",
49
- "moccasin" => "ffe4b5",
50
- "peachpuff" => "ffdab9",
51
- "palegoldenrod" => "eee8aa",
52
- "khaki" => "f0e68c",
53
- "darkkhaki" => "bdb76b",
54
- "gold" => "ffd700"
55
- },
56
- orange: {
57
- "orange" => "ffa500",
58
- "darkorange" => "ff8c00",
59
- "coral" => "ff7f50",
60
- "tomato" => "ff6347",
61
- "orangered" => "ff4500",
62
- "gold" => "ffd700"
63
- },
64
- purple: {
65
- "lavender" => "e6e6fa",
66
- "thistle" => "d8bfd8",
67
- "plum" => "dda0dd",
68
- "violet" => "ee82ee",
69
- "orchid" => "da70d6",
70
- "fuchsia" => "ff00ff",
71
- "magenta" => "ff00ff",
72
- "mediumorchid" => "ba55d3",
73
- "mediumpurple" => "9370db",
74
- "blueviolet" => "8a2be2",
75
- "darkviolet" => "9400d3",
76
- "darkorchid" => "9932cc",
77
- "darkmagenta" => "8b008b",
78
- "purple" => "800080",
79
- "indigo" => "4b0082",
80
- "darkslateblue" => "483d8b",
81
- "slateblue" => "6a5acd",
82
- "mediumslateblue" => "7b68ee"
83
- },
84
- pink: {
85
- "pink" => "ffc0cb",
86
- "lightpink" => "ffb6c1",
87
- "hotpink" => "ff69b4",
88
- "deeppink" => "ff1493",
89
- "mediumvioletred" => "c71585",
90
- "palevioletred" => "db7093"
91
- },
92
- brown: {
93
- "cornsilk" => "fff8dc",
94
- "blanchedalmond" => "ffebcd",
95
- "bisque" => "ffe4c4",
96
- "navajowhite" => "ffdead",
97
- "wheat" => "f5deb3",
98
- "burlywood" => "deb887",
99
- "tan" => "d2b48c",
100
- "rosybrown" => "bc8f8f",
101
- "sandybrown" => "f4a460",
102
- "goldenrod" => "daa520",
103
- "darkgoldenrod" => "b8860b",
104
- "peru" => "cd853f",
105
- "chocolate" => "d2691e",
106
- "saddlebrown" => "8b4513",
107
- "sienna" => "a0522d",
108
- "brown" => "a52a2a",
109
- "maroon" => "800000"
110
- },
111
- white: {
112
- "white" => "ffffff",
113
- "snow" => "fffafa",
114
- "honeydew" => "f0fff0",
115
- "mintcream" => "f5fffa",
116
- "azure" => "f0ffff",
117
- "aliceblue" => "f0f8ff",
118
- "ghostwhite" => "f8f8ff",
119
- "whitesmoke" => "f5f5f5",
120
- "seashell" => "fff5ee",
121
- "beige" => "f5f5dc",
122
- "oldlace" => "fdf5e6",
123
- "floralwhite" => "fffaf0",
124
- "ivory" => "fffff0",
125
- "antiquewhite" => "faebd7",
126
- "linen" => "faf0e6",
127
- "lavenderblush" => "fff0f5",
128
- "mistyrose" => "ffe4e1"
129
- },
130
- black: {
131
- "gainsboro" => "dcdcdc",
132
- "lightgray" => "d3d3d3",
133
- "silver" => "c0c0c0",
134
- "darkgray" => "a9a9a9",
135
- "gray" => "808080",
136
- "dimgray" => "696969",
137
- "lightslategray" => "778899",
138
- "slategray" => "708090",
139
- "darkslategray" => "2f4f4f",
140
- "black" => "000000"
141
- },
142
- gray: {
143
- "gainsboro" => "dcdcdc",
144
- "lightgray" => "d3d3d3",
145
- "silver" => "c0c0c0",
146
- "darkgray" => "a9a9a9",
147
- "gray" => "808080",
148
- "dimgray" => "696969",
149
- "lightslategray" => "778899",
150
- "slategray" => "708090",
151
- "darkslategray" => "2f4f4f"
152
- }
153
- }.freeze
7
+ # load colors from yaml file and symbolize keys
8
+ COLORS = YAML.load_file(File.join(__dir__, "colors.yml")).transform_keys(&:to_sym).freeze
154
9
  end
155
10
  end
@@ -0,0 +1,172 @@
1
+ black:
2
+ gainsboro: "dcdcdc"
3
+ lightgray: "d3d3d3"
4
+ silver: "c0c0c0"
5
+ darkgray: "a9a9a9"
6
+ gray: "808080"
7
+ dimgray: "696969"
8
+ lightslategray: "778899"
9
+ slategray: "708090"
10
+ darkslategray: "2f4f4f"
11
+ black: "000000"
12
+ white:
13
+ white: "ffffff"
14
+ snow: "fffafa"
15
+ honeydew: "f0fff0"
16
+ mintcream: "f5fffa"
17
+ azure: "f0ffff"
18
+ aliceblue: "f0f8ff"
19
+ ghostwhite: "f8f8ff"
20
+ whitesmoke: "f5f5f5"
21
+ seashell: "fff5ee"
22
+ beige: "f5f5dc"
23
+ oldlace: "fdf5e6"
24
+ floralwhite: "fffaf0"
25
+ ivory: "fffff0"
26
+ antiquewhite: "faebd7"
27
+ linen: "faf0e6"
28
+ lavenderblush: "fff0f5"
29
+ mistyrose: "ffe4e1"
30
+ navajowhite: "ffdead"
31
+ peachpuff: "ffdab9"
32
+ wheat: "f5deb3"
33
+ moccasin: "ffe4b5"
34
+ papayawhip: "ffefd5"
35
+ blanchedalmond: "ffebcd"
36
+ bisque: "ffe4c4"
37
+ eggshell: "fffacd"
38
+ lemonchiffon: "fffacd"
39
+ lightyellow: "ffffe0"
40
+ cornsilk: "fff8dc"
41
+ red:
42
+ lightcoral: "f08080"
43
+ salmon: "fa8072"
44
+ darksalmon: "e9967a"
45
+ lightsalmon: "ffa07a"
46
+ crimson: "dc143c"
47
+ red: "ff0000"
48
+ firebrick: "b22222"
49
+ darkred: "8b0000"
50
+ green:
51
+ greenyellow: "adff2f"
52
+ chartreuse: "7fff00"
53
+ lawngreen: "7cfc00"
54
+ lime: "00ff00"
55
+ limegreen: "32cd32"
56
+ palegreen: "98fb98"
57
+ lightgreen: "90ee90"
58
+ mediumspringgreen: "00fa9a"
59
+ springgreen: "00ff7f"
60
+ mediumseagreen: "3cb371"
61
+ seagreen: "2e8b57"
62
+ forestgreen: "228b22"
63
+ green: "008000"
64
+ darkgreen: "006400"
65
+ yellowgreen: "9acd32"
66
+ olivedrab: "6b8e23"
67
+ darkolivegreen: "556b2f"
68
+ mediumaquamarine: "66cdaa"
69
+ darkseagreen: "8fbc8f"
70
+ lightseagreen: "20b2aa"
71
+ darkcyan: "008b8b"
72
+ teal: "008080"
73
+ blue:
74
+ aqua: "00ffff"
75
+ cyan: "00ffff"
76
+ lightcyan: "e0ffff"
77
+ paleturquoise: "afeeee"
78
+ aquamarine: "7fffd4"
79
+ turquoise: "40e0d0"
80
+ mediumturquoise: "48d1cc"
81
+ darkturquoise: "00ced1"
82
+ cadetblue: "5f9ea0"
83
+ steelblue: "4682b4"
84
+ lightsteelblue: "b0c4de"
85
+ powderblue: "b0e0e6"
86
+ lightblue: "add8e6"
87
+ skyblue: "87ceeb"
88
+ lightskyblue: "87cefa"
89
+ deepskyblue: "00bfff"
90
+ dodgerblue: "1e90ff"
91
+ cornflowerblue: "6495ed"
92
+ mediumslateblue: "7b68ee"
93
+ royalblue: "4169e1"
94
+ blue: "0000ff"
95
+ mediumblue: "0000cd"
96
+ darkblue: "00008b"
97
+ navy: "000080"
98
+ midnightblue: "191970"
99
+ pink:
100
+ pink: "ffc0cb"
101
+ lightpink: "ffb6c1"
102
+ hotpink: "ff69b4"
103
+ deeppink: "ff1493"
104
+ palevioletred: "db7093"
105
+ mediumvioletred: "c71585"
106
+ purple:
107
+ violet: "ee82ee"
108
+ orchid: "da70d6"
109
+ plum: "dda0dd"
110
+ thistle: "d8bfd8"
111
+ lavender: "e6e6fa"
112
+ mediumorchid: "ba55d3"
113
+ mediumpurple: "9370db"
114
+ blueviolet: "8a2be2"
115
+ darkviolet: "9400d3"
116
+ darkorchid: "9932cc"
117
+ darkmagenta: "8b008b"
118
+ purple: "800080"
119
+ indigo: "4b0082"
120
+ darkslateblue: "483d8b"
121
+ slateblue: "6a5acd"
122
+ mediumslateblue: "7b68ee"
123
+ orange:
124
+ coral: "ff7f50"
125
+ tomato: "ff6347"
126
+ orangered: "ff4500"
127
+ gold: "ffd700"
128
+ orange: "ffa500"
129
+ darkorange: "ff8c00"
130
+ brown:
131
+ cornsilk: "fff8dc"
132
+ blanchedalmond: "ffebcd"
133
+ bisque: "ffe4c4"
134
+ navajowhite: "ffdead"
135
+ wheat: "f5deb3"
136
+ burlywood: "deb887"
137
+ tan: "d2b48c"
138
+ rosybrown: "bc8f8f"
139
+ sandybrown: "f4a460"
140
+ goldenrod: "daa520"
141
+ darkgoldenrod: "b8860b"
142
+ peru: "cd853f"
143
+ chocolate: "d2691e"
144
+ saddlebrown: "8b4513"
145
+ sienna: "a0522d"
146
+ brown: "a52a2a"
147
+ maroon: "800000"
148
+ yellow:
149
+ lightyellow: "ffffe0"
150
+ lemonchiffon: "fffacd"
151
+ lightgoldenrodyellow: "fafad2"
152
+ papayawhip: "ffefd5"
153
+ moccasin: "ffe4b5"
154
+ peachpuff: "ffdab9"
155
+ palegoldenrod: "eee8aa"
156
+ khaki: "f0e68c"
157
+ darkkhaki: "bdb76b"
158
+ yellow: "ffff00"
159
+ olive: "808000"
160
+ olivedrab: "6b8e23"
161
+ yellowgreen: "9acd32"
162
+ gray:
163
+ gainsboro: "dcdcdc"
164
+ lightgray: "d3d3d3"
165
+ silver: "c0c0c0"
166
+ darkgray: "a9a9a9"
167
+ gray: "808080"
168
+ dimgray: "696969"
169
+ lightslategray: "778899"
170
+ slategray: "708090"
171
+ darkslategray: "2f4f4f"
172
+ black: "000000"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HexColorGenerate
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hex_color_generate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alef Ojeda de Oliveira
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-15 00:00:00.000000000 Z
11
+ date: 2023-08-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This gem generate hexadecimal color
14
14
  email:
@@ -23,10 +23,12 @@ files:
23
23
  - LICENSE.txt
24
24
  - README.md
25
25
  - Rakefile
26
+ - gems/hex_color_generate-0.1.0.gem
26
27
  - hex_color_generate.gemspec
27
28
  - lib/hex_color_generate.rb
28
29
  - lib/hex_color_generate/class_methods.rb
29
30
  - lib/hex_color_generate/colors.rb
31
+ - lib/hex_color_generate/colors.yml
30
32
  - lib/hex_color_generate/version.rb
31
33
  - sig/hex_color_generate.rbs
32
34
  homepage: https://github.com/nemuba/hex_color_generate
@@ -44,7 +46,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
44
46
  requirements:
45
47
  - - ">="
46
48
  - !ruby/object:Gem::Version
47
- version: 2.7.1
49
+ version: '2.6'
48
50
  required_rubygems_version: !ruby/object:Gem::Requirement
49
51
  requirements:
50
52
  - - ">="