color_swatch_collection 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 47fd39c5b293136ac4da3fc621eca1ebfdca90e6aafb402c76d859ebab8d5593
4
- data.tar.gz: 47a7438fad3f2970764e0162f614a391dfd17ce9cab9af24563908341225c97d
3
+ metadata.gz: f1a53c76b4d873df0a7ac916d87e3d123fed58cf392081161ce206c0778b18b4
4
+ data.tar.gz: fc8a18b0e7ed6c0a3532bcbca750fb0a2a80f3519a480341b54a1ce6377d0545
5
5
  SHA512:
6
- metadata.gz: e87b9c29c88c133f8bb63edc11358325f78f335cacb36c82b8b4b33524e9cf376ce8c8323468d2b165058a92f5e520309696139e2fe3515ed3c7f70d9fb70a6c
7
- data.tar.gz: 41a012cc9bd1a4cb0ad78e80e72368bbc38b28acd31f9dbc72037cbb0b99b3bca344e94bec22476149258818b6d0a091481ed5c5ff0a60fe94f6f3d27896d61e
6
+ metadata.gz: d610b364352020330833a94159cf17dcc7939ed22637f51d82a562089a60e9ee29a9de19be0f2464e82bee01a1229e8821e702a85a89bba15ce617cdee3cf652
7
+ data.tar.gz: def5ad613ecb92f74c76183c32874d42c6f44669bf2a6f21eaa33dc9c0be2b97b0132455bd30f18bce589f9393a14d97abc26f39d7e542d70732d2c43d78eb11
data/README.md CHANGED
@@ -1,98 +1,103 @@
1
- # ColorSwatchCollection
2
-
3
- > Find a colour swatch from various collections.
4
-
5
- ColorSwatchCollection is a ruby gem package for use in ruby or other projects that provides colour swatches with their name and hex code from various collections. You can find colour swatches by providing either the name or hex code you want to search against. You can also query collection colour lists directly.
6
-
7
- ## Lists
8
-
9
- The colour collections:
10
-
11
- - [roygbiv](lib/color_namer_rails/roygbiv.rb)
12
- - [basic](lib/color_namer_rails/basic.rb)
13
- - [html](lib/color_namer_rails/html.rb) - the HTML color names.
14
- - [x11](lib/color_namer_rails/x11.rb) - The list that preceded the HTML color names
15
- - [pantone](lib/color_namer_rails/pantone.rb)
16
- - [ntc](lib/color_namer_rails/ntc.rb), an [astounding collection](http://chir.ag/projects/ntc/) of over 1500 named colors.
17
-
18
- ## Installation
19
-
20
- Install the gem and add to the application's Gemfile by executing:
21
-
22
- ```bash
23
- bundle add color_swatch_collection
24
- ```
25
-
26
- If bundler is not being used to manage dependencies, install the gem by executing:
27
-
28
- ```bash
29
- gem install color_swatch_collection
30
- ```
31
-
32
- ## Usage
33
-
34
- ```ruby
35
- ColorSwatchCollection.list_collections
36
- => ['basic', 'html', 'ntc', 'pantone', 'roygbiv', 'x11']
37
- ```
38
-
39
- ```ruby
40
- ColorSwatchCollection.get_from_hex('#FDBCB4')
41
- => { name: 'melon', hex: '#FDBCB4', collection: 'pantone' }
42
- ```
43
-
44
- ```ruby
45
- ColorSwatchCollection.get_from_name('navajo white')
46
- => { name: 'navajowhite', hex: '#FFDEAD', collection: 'html' }
47
- ```
48
-
49
- ```ruby
50
- ColorSwatchCollection.get_colours
51
- => [
52
- => { collection: 'basic', hex: '#000000', name: 'black' },
53
- => { collection: 'basic', hex: '#0000FF', name: 'blue' },
54
- => .
55
- => .
56
- => .
57
- => ]
58
- ```
59
-
60
- ### pick
61
-
62
- This parameter allows you to filter names from the dedicated lists for faster computation.
63
- It can be used for `get_from_hex`, `get_from_name`, or `get_colours`.
64
-
65
- ```ruby
66
- ColorSwatchCollection.get_from_hex('#00FF00', pick: ['html', 'pantone'])
67
- ColorSwatchCollection.get_from_name('blue', pick: ['x11'])
68
- ColorSwatchCollection.get_colours(pick: ['basic'])
69
- ```
70
-
71
- ### omit
72
-
73
- The opposite of `options.pick`.
74
- It can be used for `get_from_hex`, `get_from_name`, or `get_colours`.
75
-
76
- ```ruby
77
- ColorSwatchCollection.get_from_hex('#00FF00', omit: ['html', 'pantone'])
78
- ColorSwatchCollection.get_from_name('blue', omit: ['ntc'])
79
- ColorSwatchCollection.get_colours(omit: ['ntc', 'basic'])
80
- ```
81
-
82
- ## Development
83
-
84
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
85
-
86
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
87
-
88
- ## Contributing
89
-
90
- Bug reports and pull requests are welcome on GitHub at <https://github.com/louiswdavis/color_swatch_collection>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/louiswdavis/color_swatch_collection/blob/master/CODE_OF_CONDUCT.md).
91
-
92
- ## License
93
-
94
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
95
-
96
- ## Code of Conduct
97
-
98
- Everyone interacting in the ColorSwatchCollection project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/louiswdavis/color_swatch_collection/blob/master/CODE_OF_CONDUCT.md).
1
+ # ColorSwatchCollection
2
+
3
+ > Find a colour swatch from various collections.
4
+
5
+ ColorSwatchCollection is a ruby gem package for use in ruby or other projects that provides colour swatches with their name and hex code from various collections. You can find colour swatches by providing either the name or hex code you want to search against. You can also query collection colour lists directly.
6
+
7
+ ## Lists
8
+
9
+ The colour collections:
10
+
11
+ - [roygbiv](lib/color_namer_rails/roygbiv.rb)
12
+ - [basic](lib/color_namer_rails/basic.rb)
13
+ - [html](lib/color_namer_rails/html.rb) - the HTML color names.
14
+ - [x11](lib/color_namer_rails/x11.rb) - The list that preceded the HTML color names
15
+ - [pantone](lib/color_namer_rails/pantone.rb)
16
+ - [ntc](lib/color_namer_rails/ntc.rb), an [astounding collection](http://chir.ag/projects/ntc/) of over 1500 named colors.
17
+ - [tailwind](https://tailwindcss.com/) [v1](https://v1.tailwindcss.com/docs/customizing-colors#default-color-palette), [v2](https://v2.tailwindcss.com/docs/customizing-colors), [v3](https://v3.tailwindcss.com/docs/customizing-colors), and [v4](https://tailwindcss.com/docs/colors)
18
+
19
+ ## Installation
20
+
21
+ Install the gem and add to the application's Gemfile by executing:
22
+
23
+ ```bash
24
+ bundle add color_swatch_collection
25
+ ```
26
+
27
+ If bundler is not being used to manage dependencies, install the gem by executing:
28
+
29
+ ```bash
30
+ gem install color_swatch_collection
31
+ ```
32
+
33
+ ## Usage
34
+
35
+ ## Methods
36
+
37
+ ```ruby
38
+ ColorSwatchCollection.list_collections
39
+ => ['basic', 'html', 'ntc', 'pantone', 'roygbiv', 'x11', 'tailwind_v1', 'tailwind_v2', 'tailwind_v3', 'tailwind_v4']
40
+ ```
41
+
42
+ ```ruby
43
+ ColorSwatchCollection.get_from_hex('#FDBCB4')
44
+ => { name: 'melon', hex: '#FDBCB4', collection: 'pantone' }
45
+ ```
46
+
47
+ ```ruby
48
+ ColorSwatchCollection.get_from_name('navajo white')
49
+ => { name: 'navajowhite', hex: '#FFDEAD', collection: 'html' }
50
+ ```
51
+
52
+ ```ruby
53
+ ColorSwatchCollection.get_colours
54
+ => [
55
+ => { collection: 'basic', hex: '#000000', name: 'black' },
56
+ => { collection: 'basic', hex: '#0000FF', name: 'blue' },
57
+ => .
58
+ => .
59
+ => .
60
+ => ]
61
+ ```
62
+
63
+ ## Options
64
+
65
+ ### pick
66
+
67
+ This parameter allows you to filter names from the dedicated lists for faster computation.
68
+ It can be used for `get_from_hex`, `get_from_name`, or `get_colours`.
69
+
70
+ ```ruby
71
+ ColorSwatchCollection.get_from_hex('#00FF00', pick: ['html', 'pantone'])
72
+ ColorSwatchCollection.get_from_name('blue', pick: ['x11'])
73
+ ColorSwatchCollection.get_colours(pick: ['basic'])
74
+ ```
75
+
76
+ ### omit
77
+
78
+ The opposite of `options.pick`.
79
+ It can be used for `get_from_hex`, `get_from_name`, or `get_colours`.
80
+
81
+ ```ruby
82
+ ColorSwatchCollection.get_from_hex('#00FF00', omit: ['html', 'pantone'])
83
+ ColorSwatchCollection.get_from_name('blue', omit: ['ntc'])
84
+ ColorSwatchCollection.get_colours(omit: ['ntc', 'basic'])
85
+ ```
86
+
87
+ ## Development
88
+
89
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
90
+
91
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
92
+
93
+ ## Contributing
94
+
95
+ Bug reports and pull requests are welcome on GitHub at <https://github.com/louiswdavis/color_swatch_collection>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/louiswdavis/color_swatch_collection/blob/master/CODE_OF_CONDUCT.md).
96
+
97
+ ## License
98
+
99
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
100
+
101
+ ## Code of Conduct
102
+
103
+ Everyone interacting in the ColorSwatchCollection project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/louiswdavis/color_swatch_collection/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,112 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ColorSwatchCollection
4
+ class TailwindV1
5
+ def self.colours
6
+ [
7
+ { name: 'black', hex: '#000000' },
8
+ { name: 'white', hex: '#FFFFFF' },
9
+
10
+ { name: 'gray-100', hex: '#F7FAFC' },
11
+ { name: 'gray-200', hex: '#EDF2F7' },
12
+ { name: 'gray-300', hex: '#E2E8F0' },
13
+ { name: 'gray-400', hex: '#CBD5E0' },
14
+ { name: 'gray-500', hex: '#A0AEC0' },
15
+ { name: 'gray-600', hex: '#718096' },
16
+ { name: 'gray-700', hex: '#4A5568' },
17
+ { name: 'gray-800', hex: '#2D3748' },
18
+ { name: 'gray-900', hex: '#1A202C' },
19
+
20
+ { name: 'red-100', hex: '#FFF5F5' },
21
+ { name: 'red-200', hex: '#FED7D7' },
22
+ { name: 'red-300', hex: '#FEB2B2' },
23
+ { name: 'red-400', hex: '#FC8181' },
24
+ { name: 'red-500', hex: '#F56565' },
25
+ { name: 'red-600', hex: '#E53E3E' },
26
+ { name: 'red-700', hex: '#C53030' },
27
+ { name: 'red-800', hex: '#9B2C2C' },
28
+ { name: 'red-900', hex: '#742A2A' },
29
+
30
+ { name: 'orange-100', hex: '#FFFAF0' },
31
+ { name: 'orange-200', hex: '#FEEBC8' },
32
+ { name: 'orange-300', hex: '#FBD38D' },
33
+ { name: 'orange-400', hex: '#F6AD55' },
34
+ { name: 'orange-500', hex: '#ED8936' },
35
+ { name: 'orange-600', hex: '#DD6B20' },
36
+ { name: 'orange-700', hex: '#C05621' },
37
+ { name: 'orange-800', hex: '#9C4221' },
38
+ { name: 'orange-900', hex: '#7B341E' },
39
+
40
+ { name: 'yellow-100', hex: '#FFFFF0' },
41
+ { name: 'yellow-200', hex: '#FEFCBF' },
42
+ { name: 'yellow-300', hex: '#FAF089' },
43
+ { name: 'yellow-400', hex: '#F6E05E' },
44
+ { name: 'yellow-500', hex: '#ECC94B' },
45
+ { name: 'yellow-600', hex: '#D69E2E' },
46
+ { name: 'yellow-700', hex: '#B7791F' },
47
+ { name: 'yellow-800', hex: '#975A16' },
48
+ { name: 'yellow-900', hex: '#744210' },
49
+
50
+ { name: 'green-100', hex: '#F0FFF4' },
51
+ { name: 'green-200', hex: '#C6F6D5' },
52
+ { name: 'green-300', hex: '#9AE6B4' },
53
+ { name: 'green-400', hex: '#68D391' },
54
+ { name: 'green-500', hex: '#48BB78' },
55
+ { name: 'green-600', hex: '#38A169' },
56
+ { name: 'green-700', hex: '#2F855A' },
57
+ { name: 'green-800', hex: '#276749' },
58
+ { name: 'green-900', hex: '#22543D' },
59
+
60
+ { name: 'teal-100', hex: '#E6FFFA' },
61
+ { name: 'teal-200', hex: '#B2F5EA' },
62
+ { name: 'teal-300', hex: '#81E6D9' },
63
+ { name: 'teal-400', hex: '#4FD1C5' },
64
+ { name: 'teal-500', hex: '#38B2AC' },
65
+ { name: 'teal-600', hex: '#319795' },
66
+ { name: 'teal-700', hex: '#2C7A7B' },
67
+ { name: 'teal-800', hex: '#285E61' },
68
+ { name: 'teal-900', hex: '#234E52' },
69
+
70
+ { name: 'blue-100', hex: '#EBF8FF' },
71
+ { name: 'blue-200', hex: '#BEE3F8' },
72
+ { name: 'blue-300', hex: '#90CDF4' },
73
+ { name: 'blue-400', hex: '#63B3ED' },
74
+ { name: 'blue-500', hex: '#4299E1' },
75
+ { name: 'blue-600', hex: '#3182CE' },
76
+ { name: 'blue-700', hex: '#2B6CB0' },
77
+ { name: 'blue-800', hex: '#2C5282' },
78
+ { name: 'blue-900', hex: '#2A4365' },
79
+
80
+ { name: 'indigo-100', hex: '#EBF4FF' },
81
+ { name: 'indigo-200', hex: '#C3DAFE' },
82
+ { name: 'indigo-300', hex: '#A3BFFA' },
83
+ { name: 'indigo-400', hex: '#7F9CF5' },
84
+ { name: 'indigo-500', hex: '#667EEA' },
85
+ { name: 'indigo-600', hex: '#5A67D8' },
86
+ { name: 'indigo-700', hex: '#4C51BF' },
87
+ { name: 'indigo-800', hex: '#434190' },
88
+ { name: 'indigo-900', hex: '#3C366B' },
89
+
90
+ { name: 'purple-100', hex: '#FAF5FF' },
91
+ { name: 'purple-200', hex: '#E9D8FD' },
92
+ { name: 'purple-300', hex: '#D6BCFA' },
93
+ { name: 'purple-400', hex: '#B794F4' },
94
+ { name: 'purple-500', hex: '#9F7AEA' },
95
+ { name: 'purple-600', hex: '#805AD5' },
96
+ { name: 'purple-700', hex: '#6B46C1' },
97
+ { name: 'purple-800', hex: '#553C9A' },
98
+ { name: 'purple-900', hex: '#44337A' },
99
+
100
+ { name: 'pink-100', hex: '#FFF5F7' },
101
+ { name: 'pink-200', hex: '#FED7E2' },
102
+ { name: 'pink-300', hex: '#FBB6CE' },
103
+ { name: 'pink-400', hex: '#F687B3' },
104
+ { name: 'pink-500', hex: '#ED64A6' },
105
+ { name: 'pink-600', hex: '#D53F8C' },
106
+ { name: 'pink-700', hex: '#B83280' },
107
+ { name: 'pink-800', hex: '#97266D' },
108
+ { name: 'pink-900', hex: '#702459' }
109
+ ]
110
+ end
111
+ end
112
+ end
@@ -0,0 +1,97 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ColorSwatchCollection
4
+ class TailwindV2
5
+ def self.colours
6
+ [
7
+ { name: 'gray-50', hex: '#F9FAFB' },
8
+ { name: 'gray-100', hex: '#F3F4F6' },
9
+ { name: 'gray-200', hex: '#E5E7EB' },
10
+ { name: 'gray-300', hex: '#D1D5DB' },
11
+ { name: 'gray-400', hex: '#9CA3AF' },
12
+ { name: 'gray-500', hex: '#6B7280' },
13
+ { name: 'gray-600', hex: '#4B5563' },
14
+ { name: 'gray-700', hex: '#374151' },
15
+ { name: 'gray-800', hex: '#1F2937' },
16
+ { name: 'gray-900', hex: '#111827' },
17
+
18
+ { name: 'red-50', hex: '#FEF2F2' },
19
+ { name: 'red-100', hex: '#FEE2E2' },
20
+ { name: 'red-200', hex: '#FECACA' },
21
+ { name: 'red-300', hex: '#FCA5A5' },
22
+ { name: 'red-400', hex: '#F87171' },
23
+ { name: 'red-500', hex: '#EF4444' },
24
+ { name: 'red-600', hex: '#DC2626' },
25
+ { name: 'red-700', hex: '#B91C1C' },
26
+ { name: 'red-800', hex: '#991B1B' },
27
+ { name: 'red-900', hex: '#7F1D1D' },
28
+
29
+ { name: 'yellow-50', hex: '#FFFBEB' },
30
+ { name: 'yellow-100', hex: '#FEF3C7' },
31
+ { name: 'yellow-200', hex: '#FDE68A' },
32
+ { name: 'yellow-300', hex: '#FCD34D' },
33
+ { name: 'yellow-400', hex: '#FBBF24' },
34
+ { name: 'yellow-500', hex: '#F59E0B' },
35
+ { name: 'yellow-600', hex: '#D97706' },
36
+ { name: 'yellow-700', hex: '#B45309' },
37
+ { name: 'yellow-800', hex: '#92400E' },
38
+ { name: 'yellow-900', hex: '#78350F' },
39
+
40
+ { name: 'green-50', hex: '#ECFDF5' },
41
+ { name: 'green-100', hex: '#D1FAE5' },
42
+ { name: 'green-200', hex: '#A7F3D0' },
43
+ { name: 'green-300', hex: '#6EE7B7' },
44
+ { name: 'green-400', hex: '#34D399' },
45
+ { name: 'green-500', hex: '#10B981' },
46
+ { name: 'green-600', hex: '#059669' },
47
+ { name: 'green-700', hex: '#047857' },
48
+ { name: 'green-800', hex: '#065F46' },
49
+ { name: 'green-900', hex: '#064E3B' },
50
+
51
+ { name: 'blue-50', hex: '#EFF6FF' },
52
+ { name: 'blue-100', hex: '#DBEAFE' },
53
+ { name: 'blue-200', hex: '#BFDBFE' },
54
+ { name: 'blue-300', hex: '#93C5FD' },
55
+ { name: 'blue-400', hex: '#60A5FA' },
56
+ { name: 'blue-500', hex: '#3B82F6' },
57
+ { name: 'blue-600', hex: '#2563EB' },
58
+ { name: 'blue-700', hex: '#1D4ED8' },
59
+ { name: 'blue-800', hex: '#1E40AF' },
60
+ { name: 'blue-900', hex: '#1E3A8A' },
61
+
62
+ { name: 'indigo-50', hex: '#EEF2FF' },
63
+ { name: 'indigo-100', hex: '#E0E7FF' },
64
+ { name: 'indigo-200', hex: '#C7D2FE' },
65
+ { name: 'indigo-300', hex: '#A5B4FC' },
66
+ { name: 'indigo-400', hex: '#818CF8' },
67
+ { name: 'indigo-500', hex: '#6366F1' },
68
+ { name: 'indigo-600', hex: '#4F46E5' },
69
+ { name: 'indigo-700', hex: '#4338CA' },
70
+ { name: 'indigo-800', hex: '#3730A3' },
71
+ { name: 'indigo-900', hex: '#312E81' },
72
+
73
+ { name: 'purple-50', hex: '#F5F3FF' },
74
+ { name: 'purple-100', hex: '#EDE9FE' },
75
+ { name: 'purple-200', hex: '#DDD6FE' },
76
+ { name: 'purple-300', hex: '#C4B5FD' },
77
+ { name: 'purple-400', hex: '#A78BFA' },
78
+ { name: 'purple-500', hex: '#8B5CF6' },
79
+ { name: 'purple-600', hex: '#7C3AED' },
80
+ { name: 'purple-700', hex: '#6D28D9' },
81
+ { name: 'purple-800', hex: '#5B21B6' },
82
+ { name: 'purple-900', hex: '#4C1D95' },
83
+
84
+ { name: 'pink-50', hex: '#FDF2F8' },
85
+ { name: 'pink-100', hex: '#FCE7F3' },
86
+ { name: 'pink-200', hex: '#FBCFE8' },
87
+ { name: 'pink-300', hex: '#F9A8D4' },
88
+ { name: 'pink-400', hex: '#F472B6' },
89
+ { name: 'pink-500', hex: '#EC4899' },
90
+ { name: 'pink-600', hex: '#DB2777' },
91
+ { name: 'pink-700', hex: '#BE185D' },
92
+ { name: 'pink-800', hex: '#9D174D' },
93
+ { name: 'pink-900', hex: '#831843' }
94
+ ]
95
+ end
96
+ end
97
+ end
@@ -0,0 +1,273 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ColorSwatchCollection
4
+ class TailwindV3
5
+ def self.colours
6
+ [
7
+ { name: 'slate-50', hex: '#F8FAFC' },
8
+ { name: 'slate-100', hex: '#F1F5F9' },
9
+ { name: 'slate-200', hex: '#E2E8F0' },
10
+ { name: 'slate-300', hex: '#CBD5E1' },
11
+ { name: 'slate-400', hex: '#94A3B8' },
12
+ { name: 'slate-500', hex: '#64748B' },
13
+ { name: 'slate-600', hex: '#475569' },
14
+ { name: 'slate-700', hex: '#334155' },
15
+ { name: 'slate-800', hex: '#1E293B' },
16
+ { name: 'slate-900', hex: '#0F172A' },
17
+ { name: 'slate-950', hex: '#020617' },
18
+
19
+ { name: 'gray-50', hex: '#F9FAFB' },
20
+ { name: 'gray-100', hex: '#F3F4F6' },
21
+ { name: 'gray-200', hex: '#E5E7EB' },
22
+ { name: 'gray-300', hex: '#D1D5DB' },
23
+ { name: 'gray-400', hex: '#9CA3AF' },
24
+ { name: 'gray-500', hex: '#6B7280' },
25
+ { name: 'gray-600', hex: '#4B5563' },
26
+ { name: 'gray-700', hex: '#374151' },
27
+ { name: 'gray-800', hex: '#1F2937' },
28
+ { name: 'gray-900', hex: '#111827' },
29
+ { name: 'gray-950', hex: '#030712' },
30
+
31
+ { name: 'zinc-50', hex: '#FAFAFA' },
32
+ { name: 'zinc-100', hex: '#F4F4F5' },
33
+ { name: 'zinc-200', hex: '#E4E4E7' },
34
+ { name: 'zinc-300', hex: '#D4D4D8' },
35
+ { name: 'zinc-400', hex: '#A1A1AA' },
36
+ { name: 'zinc-500', hex: '#71717A' },
37
+ { name: 'zinc-600', hex: '#52525B' },
38
+ { name: 'zinc-700', hex: '#3F3F46' },
39
+ { name: 'zinc-800', hex: '#27272A' },
40
+ { name: 'zinc-900', hex: '#18181B' },
41
+ { name: 'zinc-950', hex: '#09090B' },
42
+
43
+ { name: 'neutral-50', hex: '#FAFAFA' },
44
+ { name: 'neutral-100', hex: '#F5F5F5' },
45
+ { name: 'neutral-200', hex: '#E5E5E5' },
46
+ { name: 'neutral-300', hex: '#D4D4D4' },
47
+ { name: 'neutral-400', hex: '#A3A3A3' },
48
+ { name: 'neutral-500', hex: '#737373' },
49
+ { name: 'neutral-600', hex: '#525252' },
50
+ { name: 'neutral-700', hex: '#404040' },
51
+ { name: 'neutral-800', hex: '#262626' },
52
+ { name: 'neutral-900', hex: '#171717' },
53
+ { name: 'neutral-950', hex: '#0A0A0A' },
54
+
55
+ { name: 'stone-50', hex: '#FAFAF9' },
56
+ { name: 'stone-100', hex: '#F5F5F4' },
57
+ { name: 'stone-200', hex: '#E7E5E4' },
58
+ { name: 'stone-300', hex: '#D6D3D1' },
59
+ { name: 'stone-400', hex: '#A8A29E' },
60
+ { name: 'stone-500', hex: '#78716C' },
61
+ { name: 'stone-600', hex: '#57534E' },
62
+ { name: 'stone-700', hex: '#44403C' },
63
+ { name: 'stone-800', hex: '#292524' },
64
+ { name: 'stone-900', hex: '#1C1917' },
65
+ { name: 'stone-950', hex: '#0C0A09' },
66
+
67
+ { name: 'red-50', hex: '#FEF2F2' },
68
+ { name: 'red-100', hex: '#FEE2E2' },
69
+ { name: 'red-200', hex: '#FECACA' },
70
+ { name: 'red-300', hex: '#FCA5A5' },
71
+ { name: 'red-400', hex: '#F87171' },
72
+ { name: 'red-500', hex: '#EF4444' },
73
+ { name: 'red-600', hex: '#DC2626' },
74
+ { name: 'red-700', hex: '#B91C1C' },
75
+ { name: 'red-800', hex: '#991B1B' },
76
+ { name: 'red-900', hex: '#7F1D1D' },
77
+ { name: 'red-950', hex: '#450A0A' },
78
+
79
+ { name: 'orange-50', hex: '#FFF7ED' },
80
+ { name: 'orange-100', hex: '#FFEDD5' },
81
+ { name: 'orange-200', hex: '#FED7AA' },
82
+ { name: 'orange-300', hex: '#FDBA74' },
83
+ { name: 'orange-400', hex: '#FB923C' },
84
+ { name: 'orange-500', hex: '#F97316' },
85
+ { name: 'orange-600', hex: '#EA580C' },
86
+ { name: 'orange-700', hex: '#C2410C' },
87
+ { name: 'orange-800', hex: '#9A3412' },
88
+ { name: 'orange-900', hex: '#7C2D12' },
89
+ { name: 'orange-950', hex: '#431407' },
90
+
91
+ { name: 'amber-50', hex: '#FFFBEB' },
92
+ { name: 'amber-100', hex: '#FEF3C7' },
93
+ { name: 'amber-200', hex: '#FDE68A' },
94
+ { name: 'amber-300', hex: '#FCD34D' },
95
+ { name: 'amber-400', hex: '#FBBF24' },
96
+ { name: 'amber-500', hex: '#F59E0B' },
97
+ { name: 'amber-600', hex: '#D97706' },
98
+ { name: 'amber-700', hex: '#B45309' },
99
+ { name: 'amber-800', hex: '#92400E' },
100
+ { name: 'amber-900', hex: '#78350F' },
101
+ { name: 'amber-950', hex: '#451A03' },
102
+
103
+ { name: 'yellow-50', hex: '#FEFCE8' },
104
+ { name: 'yellow-100', hex: '#FEF9C3' },
105
+ { name: 'yellow-200', hex: '#FEF08A' },
106
+ { name: 'yellow-300', hex: '#FDE047' },
107
+ { name: 'yellow-400', hex: '#FACC15' },
108
+ { name: 'yellow-500', hex: '#EAB308' },
109
+ { name: 'yellow-600', hex: '#CA8A04' },
110
+ { name: 'yellow-700', hex: '#A16207' },
111
+ { name: 'yellow-800', hex: '#854D0E' },
112
+ { name: 'yellow-900', hex: '#713F12' },
113
+ { name: 'yellow-950', hex: '#422006' },
114
+
115
+ { name: 'lime-50', hex: '#F7FEE7' },
116
+ { name: 'lime-100', hex: '#ECFCCB' },
117
+ { name: 'lime-200', hex: '#D9F99D' },
118
+ { name: 'lime-300', hex: '#BEF264' },
119
+ { name: 'lime-400', hex: '#A3E635' },
120
+ { name: 'lime-500', hex: '#84CC16' },
121
+ { name: 'lime-600', hex: '#65A30D' },
122
+ { name: 'lime-700', hex: '#4D7C0F' },
123
+ { name: 'lime-800', hex: '#3F6212' },
124
+ { name: 'lime-900', hex: '#365314' },
125
+ { name: 'lime-950', hex: '#1A2E05' },
126
+
127
+ { name: 'green-50', hex: '#F0FDF4' },
128
+ { name: 'green-100', hex: '#DCFCE7' },
129
+ { name: 'green-200', hex: '#BBF7D0' },
130
+ { name: 'green-300', hex: '#86EFAC' },
131
+ { name: 'green-400', hex: '#4ADE80' },
132
+ { name: 'green-500', hex: '#22C55E' },
133
+ { name: 'green-600', hex: '#16A34A' },
134
+ { name: 'green-700', hex: '#15803D' },
135
+ { name: 'green-800', hex: '#166534' },
136
+ { name: 'green-900', hex: '#14532D' },
137
+ { name: 'green-950', hex: '#052E16' },
138
+
139
+ { name: 'emerald-50', hex: '#ECFDF5' },
140
+ { name: 'emerald-100', hex: '#D1FAE5' },
141
+ { name: 'emerald-200', hex: '#A7F3D0' },
142
+ { name: 'emerald-300', hex: '#6EE7B7' },
143
+ { name: 'emerald-400', hex: '#34D399' },
144
+ { name: 'emerald-500', hex: '#10B981' },
145
+ { name: 'emerald-600', hex: '#059669' },
146
+ { name: 'emerald-700', hex: '#047857' },
147
+ { name: 'emerald-800', hex: '#065F46' },
148
+ { name: 'emerald-900', hex: '#064E3B' },
149
+ { name: 'emerald-950', hex: '#022C22' },
150
+
151
+ { name: 'teal-50', hex: '#F0FDFA' },
152
+ { name: 'teal-100', hex: '#CCFBF1' },
153
+ { name: 'teal-200', hex: '#99F6E4' },
154
+ { name: 'teal-300', hex: '#5EEAD4' },
155
+ { name: 'teal-400', hex: '#2DD4BF' },
156
+ { name: 'teal-500', hex: '#14B8A6' },
157
+ { name: 'teal-600', hex: '#0D9488' },
158
+ { name: 'teal-700', hex: '#0F766E' },
159
+ { name: 'teal-800', hex: '#115E59' },
160
+ { name: 'teal-900', hex: '#134E4A' },
161
+ { name: 'teal-950', hex: '#042F2E' },
162
+
163
+ { name: 'cyan-50', hex: '#ECFEFF' },
164
+ { name: 'cyan-100', hex: '#CFFAFE' },
165
+ { name: 'cyan-200', hex: '#A5F3FC' },
166
+ { name: 'cyan-300', hex: '#67E8F9' },
167
+ { name: 'cyan-400', hex: '#22D3EE' },
168
+ { name: 'cyan-500', hex: '#06B6D4' },
169
+ { name: 'cyan-600', hex: '#0891B2' },
170
+ { name: 'cyan-700', hex: '#0E7490' },
171
+ { name: 'cyan-800', hex: '#155E75' },
172
+ { name: 'cyan-900', hex: '#164E63' },
173
+ { name: 'cyan-950', hex: '#083344' },
174
+
175
+ { name: 'sky-50', hex: '#F0F9FF' },
176
+ { name: 'sky-100', hex: '#E0F2FE' },
177
+ { name: 'sky-200', hex: '#BAE6FD' },
178
+ { name: 'sky-300', hex: '#7DD3FC' },
179
+ { name: 'sky-400', hex: '#38BDF8' },
180
+ { name: 'sky-500', hex: '#0EA5E9' },
181
+ { name: 'sky-600', hex: '#0284C7' },
182
+ { name: 'sky-700', hex: '#0369A1' },
183
+ { name: 'sky-800', hex: '#075985' },
184
+ { name: 'sky-900', hex: '#0C4A6E' },
185
+ { name: 'sky-950', hex: '#082F49' },
186
+
187
+ { name: 'blue-50', hex: '#EFF6FF' },
188
+ { name: 'blue-100', hex: '#DBEAFE' },
189
+ { name: 'blue-200', hex: '#BFDBFE' },
190
+ { name: 'blue-300', hex: '#93C5FD' },
191
+ { name: 'blue-400', hex: '#60A5FA' },
192
+ { name: 'blue-500', hex: '#3B82F6' },
193
+ { name: 'blue-600', hex: '#2563EB' },
194
+ { name: 'blue-700', hex: '#1D4ED8' },
195
+ { name: 'blue-800', hex: '#1E40AF' },
196
+ { name: 'blue-900', hex: '#1E3A8A' },
197
+ { name: 'blue-950', hex: '#172554' },
198
+
199
+ { name: 'indigo-50', hex: '#EEF2FF' },
200
+ { name: 'indigo-100', hex: '#E0E7FF' },
201
+ { name: 'indigo-200', hex: '#C7D2FE' },
202
+ { name: 'indigo-300', hex: '#A5B4FC' },
203
+ { name: 'indigo-400', hex: '#818CF8' },
204
+ { name: 'indigo-500', hex: '#6366F1' },
205
+ { name: 'indigo-600', hex: '#4F46E5' },
206
+ { name: 'indigo-700', hex: '#4338CA' },
207
+ { name: 'indigo-800', hex: '#3730A3' },
208
+ { name: 'indigo-900', hex: '#312E81' },
209
+ { name: 'indigo-950', hex: '#1E1B4B' },
210
+
211
+ { name: 'violet-50', hex: '#F5F3FF' },
212
+ { name: 'violet-100', hex: '#EDE9FE' },
213
+ { name: 'violet-200', hex: '#DDD6FE' },
214
+ { name: 'violet-300', hex: '#C4B5FD' },
215
+ { name: 'violet-400', hex: '#A78BFA' },
216
+ { name: 'violet-500', hex: '#8B5CF6' },
217
+ { name: 'violet-600', hex: '#7C3AED' },
218
+ { name: 'violet-700', hex: '#6D28D9' },
219
+ { name: 'violet-800', hex: '#5B21B6' },
220
+ { name: 'violet-900', hex: '#4C1D95' },
221
+ { name: 'violet-950', hex: '#2E1065' },
222
+
223
+ { name: 'purple-50', hex: '#FAF5FF' },
224
+ { name: 'purple-100', hex: '#F3E8FF' },
225
+ { name: 'purple-200', hex: '#E9D5FF' },
226
+ { name: 'purple-300', hex: '#D8B4FE' },
227
+ { name: 'purple-400', hex: '#C084FC' },
228
+ { name: 'purple-500', hex: '#A855F7' },
229
+ { name: 'purple-600', hex: '#9333EA' },
230
+ { name: 'purple-700', hex: '#7E22CE' },
231
+ { name: 'purple-800', hex: '#6B21A8' },
232
+ { name: 'purple-900', hex: '#581C87' },
233
+ { name: 'purple-950', hex: '#3B0764' },
234
+
235
+ { name: 'fuchsia-50', hex: '#FDF4FF' },
236
+ { name: 'fuchsia-100', hex: '#FAE8FF' },
237
+ { name: 'fuchsia-200', hex: '#F5D0FE' },
238
+ { name: 'fuchsia-300', hex: '#F0ABFC' },
239
+ { name: 'fuchsia-400', hex: '#E879F9' },
240
+ { name: 'fuchsia-500', hex: '#D946EF' },
241
+ { name: 'fuchsia-600', hex: '#C026D3' },
242
+ { name: 'fuchsia-700', hex: '#A21CAF' },
243
+ { name: 'fuchsia-800', hex: '#86198F' },
244
+ { name: 'fuchsia-900', hex: '#701A75' },
245
+ { name: 'fuchsia-950', hex: '#4A044E' },
246
+
247
+ { name: 'pink-50', hex: '#FDF2F8' },
248
+ { name: 'pink-100', hex: '#FCE7F3' },
249
+ { name: 'pink-200', hex: '#FBCFE8' },
250
+ { name: 'pink-300', hex: '#F9A8D4' },
251
+ { name: 'pink-400', hex: '#F472B6' },
252
+ { name: 'pink-500', hex: '#EC4899' },
253
+ { name: 'pink-600', hex: '#DB2777' },
254
+ { name: 'pink-700', hex: '#BE185D' },
255
+ { name: 'pink-800', hex: '#9D174D' },
256
+ { name: 'pink-900', hex: '#831843' },
257
+ { name: 'pink-950', hex: '#500724' },
258
+
259
+ { name: 'rose-50', hex: '#FFF1F2' },
260
+ { name: 'rose-100', hex: '#FFE4E6' },
261
+ { name: 'rose-200', hex: '#FECDD3' },
262
+ { name: 'rose-300', hex: '#FDA4AF' },
263
+ { name: 'rose-400', hex: '#FB7185' },
264
+ { name: 'rose-500', hex: '#F43F5E' },
265
+ { name: 'rose-600', hex: '#E11D48' },
266
+ { name: 'rose-700', hex: '#BE123C' },
267
+ { name: 'rose-800', hex: '#9F1239' },
268
+ { name: 'rose-900', hex: '#881337' },
269
+ { name: 'rose-950', hex: '#4C0519' }
270
+ ]
271
+ end
272
+ end
273
+ end
@@ -0,0 +1,275 @@
1
+ # frozen_string_literal: true
2
+
3
+ # converted from the OKLCh values that Tailwind uses for the colours, using ColorConverters which has been reliable for these types of conversions
4
+
5
+ module ColorSwatchCollection
6
+ class TailwindV4
7
+ def self.colours
8
+ [
9
+ { name: 'red-50', hex: '#FEF2F2' },
10
+ { name: 'red-100', hex: '#FEE1E1' },
11
+ { name: 'red-200', hex: '#FFC9C9' },
12
+ { name: 'red-300', hex: '#FFA1A2' },
13
+ { name: 'red-400', hex: '#FF6366' },
14
+ { name: 'red-500', hex: '#FA2B36' },
15
+ { name: 'red-600', hex: '#E7000A' },
16
+ { name: 'red-700', hex: '#C10007' },
17
+ { name: 'red-800', hex: '#9E0711' },
18
+ { name: 'red-900', hex: '#811719' },
19
+ { name: 'red-950', hex: '#460808' },
20
+
21
+ { name: 'orange-50', hex: '#FFF7EC' },
22
+ { name: 'orange-100', hex: '#FFECD4' },
23
+ { name: 'orange-200', hex: '#FFD6A7' },
24
+ { name: 'orange-300', hex: '#FFB869' },
25
+ { name: 'orange-400', hex: '#FF8803' },
26
+ { name: 'orange-500', hex: '#FF6800' },
27
+ { name: 'orange-600', hex: '#F44900' },
28
+ { name: 'orange-700', hex: '#C93400' },
29
+ { name: 'orange-800', hex: '#9F2D00' },
30
+ { name: 'orange-900', hex: '#7E2A0B' },
31
+ { name: 'orange-950', hex: '#431205' },
32
+
33
+ { name: 'amber-50', hex: '#FFFBEA' },
34
+ { name: 'amber-100', hex: '#FEF3C6' },
35
+ { name: 'amber-200', hex: '#FDE585' },
36
+ { name: 'amber-300', hex: '#FFD22F' },
37
+ { name: 'amber-400', hex: '#FFB900' },
38
+ { name: 'amber-500', hex: '#FD9900' },
39
+ { name: 'amber-600', hex: '#E17100' },
40
+ { name: 'amber-700', hex: '#BA4C00' },
41
+ { name: 'amber-800', hex: '#963B00' },
42
+ { name: 'amber-900', hex: '#7A3206' },
43
+ { name: 'amber-950', hex: '#451901' },
44
+
45
+ { name: 'yellow-50', hex: '#FDFBE8' },
46
+ { name: 'yellow-100', hex: '#FEF9C1' },
47
+ { name: 'yellow-200', hex: '#FEEF85' },
48
+ { name: 'yellow-300', hex: '#FFDF20' },
49
+ { name: 'yellow-400', hex: '#FDC700' },
50
+ { name: 'yellow-500', hex: '#F0B000' },
51
+ { name: 'yellow-600', hex: '#D08700' },
52
+ { name: 'yellow-700', hex: '#A65F00' },
53
+ { name: 'yellow-800', hex: '#884A00' },
54
+ { name: 'yellow-900', hex: '#723D0A' },
55
+ { name: 'yellow-950', hex: '#421F04' },
56
+
57
+ { name: 'lime-50', hex: '#F7FEE7' },
58
+ { name: 'lime-100', hex: '#EBFCCA' },
59
+ { name: 'lime-200', hex: '#D8F998' },
60
+ { name: 'lime-300', hex: '#BAF351' },
61
+ { name: 'lime-400', hex: '#99E500' },
62
+ { name: 'lime-500', hex: '#7CCE00' },
63
+ { name: 'lime-600', hex: '#5EA500' },
64
+ { name: 'lime-700', hex: '#487D00' },
65
+ { name: 'lime-800', hex: '#3C6200' },
66
+ { name: 'lime-900', hex: '#34530E' },
67
+ { name: 'lime-950', hex: '#192E02' },
68
+
69
+ { name: 'green-50', hex: '#F0FDF4' },
70
+ { name: 'green-100', hex: '#DBFBE6' },
71
+ { name: 'green-200', hex: '#B8F7CF' },
72
+ { name: 'green-300', hex: '#7AF1A7' },
73
+ { name: 'green-400', hex: '#05DF72' },
74
+ { name: 'green-500', hex: '#00C850' },
75
+ { name: 'green-600', hex: '#00A63D' },
76
+ { name: 'green-700', hex: '#008235' },
77
+ { name: 'green-800', hex: '#016630' },
78
+ { name: 'green-900', hex: '#0D532B' },
79
+ { name: 'green-950', hex: '#032E15' },
80
+
81
+ { name: 'emerald-50', hex: '#EBFCF4' },
82
+ { name: 'emerald-100', hex: '#D0FAE4' },
83
+ { name: 'emerald-200', hex: '#A4F3CF' },
84
+ { name: 'emerald-300', hex: '#5EE9B4' },
85
+ { name: 'emerald-400', hex: '#00D491' },
86
+ { name: 'emerald-500', hex: '#00BC7C' },
87
+ { name: 'emerald-600', hex: '#009865' },
88
+ { name: 'emerald-700', hex: '#007955' },
89
+ { name: 'emerald-800', hex: '#006044' },
90
+ { name: 'emerald-900', hex: '#004E3A' },
91
+ { name: 'emerald-950', hex: '#002C21' },
92
+
93
+ { name: 'teal-50', hex: '#F0FDFA' },
94
+ { name: 'teal-100', hex: '#CBFBF1' },
95
+ { name: 'teal-200', hex: '#95F6E4' },
96
+ { name: 'teal-300', hex: '#46ECD4' },
97
+ { name: 'teal-400', hex: '#00D4BD' },
98
+ { name: 'teal-500', hex: '#00BBA6' },
99
+ { name: 'teal-600', hex: '#009689' },
100
+ { name: 'teal-700', hex: '#00776E' },
101
+ { name: 'teal-800', hex: '#005F59' },
102
+ { name: 'teal-900', hex: '#0A4E4A' },
103
+ { name: 'teal-950', hex: '#022F2E' },
104
+
105
+ { name: 'cyan-50', hex: '#EBFDFE' },
106
+ { name: 'cyan-100', hex: '#CEFAFE' },
107
+ { name: 'cyan-200', hex: '#A2F3FC' },
108
+ { name: 'cyan-300', hex: '#53E9FC' },
109
+ { name: 'cyan-400', hex: '#00D2F2' },
110
+ { name: 'cyan-500', hex: '#00B8DA' },
111
+ { name: 'cyan-600', hex: '#0092B8' },
112
+ { name: 'cyan-700', hex: '#007594' },
113
+ { name: 'cyan-800', hex: '#005E78' },
114
+ { name: 'cyan-900', hex: '#104E64' },
115
+ { name: 'cyan-950', hex: '#053344' },
116
+
117
+ { name: 'sky-50', hex: '#EFF9FF' },
118
+ { name: 'sky-100', hex: '#DFF1FE' },
119
+ { name: 'sky-200', hex: '#B8E6FE' },
120
+ { name: 'sky-300', hex: '#73D4FF' },
121
+ { name: 'sky-400', hex: '#00BBFF' },
122
+ { name: 'sky-500', hex: '#00A5F4' },
123
+ { name: 'sky-600', hex: '#0084D1' },
124
+ { name: 'sky-700', hex: '#0068A8' },
125
+ { name: 'sky-800', hex: '#005889' },
126
+ { name: 'sky-900', hex: '#014A70' },
127
+ { name: 'sky-950', hex: '#052E4A' },
128
+
129
+ { name: 'blue-50', hex: '#EEF5FE' },
130
+ { name: 'blue-100', hex: '#DAEAFE' },
131
+ { name: 'blue-200', hex: '#BDDAFF' },
132
+ { name: 'blue-300', hex: '#8DC5FF' },
133
+ { name: 'blue-400', hex: '#50A2FF' },
134
+ { name: 'blue-500', hex: '#2B7FFF' },
135
+ { name: 'blue-600', hex: '#155CFB' },
136
+ { name: 'blue-700', hex: '#1347E5' },
137
+ { name: 'blue-800', hex: '#193BB8' },
138
+ { name: 'blue-900', hex: '#1B388E' },
139
+ { name: 'blue-950', hex: '#162455' },
140
+
141
+ { name: 'indigo-50', hex: '#EEF2FF' },
142
+ { name: 'indigo-100', hex: '#DFE7FF' },
143
+ { name: 'indigo-200', hex: '#C6D1FF' },
144
+ { name: 'indigo-300', hex: '#A2B3FF' },
145
+ { name: 'indigo-400', hex: '#7C86FF' },
146
+ { name: 'indigo-500', hex: '#615EFF' },
147
+ { name: 'indigo-600', hex: '#4F39F6' },
148
+ { name: 'indigo-700', hex: '#432DD7' },
149
+ { name: 'indigo-800', hex: '#3629AB' },
150
+ { name: 'indigo-900', hex: '#302C85' },
151
+ { name: 'indigo-950', hex: '#1D1A4C' },
152
+
153
+ { name: 'violet-50', hex: '#F4F2FE' },
154
+ { name: 'violet-100', hex: '#ECE8FE' },
155
+ { name: 'violet-200', hex: '#DCD5FF' },
156
+ { name: 'violet-300', hex: '#C4B3FF' },
157
+ { name: 'violet-400', hex: '#A683FF' },
158
+ { name: 'violet-500', hex: '#8D51FF' },
159
+ { name: 'violet-600', hex: '#7F22FD' },
160
+ { name: 'violet-700', hex: '#7008E7' },
161
+ { name: 'violet-800', hex: '#5D0EC0' },
162
+ { name: 'violet-900', hex: '#4D1699' },
163
+ { name: 'violet-950', hex: '#2E0C67' },
164
+
165
+ { name: 'purple-50', hex: '#FAF5FE' },
166
+ { name: 'purple-100', hex: '#F2E7FE' },
167
+ { name: 'purple-200', hex: '#E9D4FF' },
168
+ { name: 'purple-300', hex: '#D9B1FF' },
169
+ { name: 'purple-400', hex: '#C17AFF' },
170
+ { name: 'purple-500', hex: '#AC46FF' },
171
+ { name: 'purple-600', hex: '#980FFA' },
172
+ { name: 'purple-700', hex: '#8200DA' },
173
+ { name: 'purple-800', hex: '#6D10B0' },
174
+ { name: 'purple-900', hex: '#59168B' },
175
+ { name: 'purple-950', hex: '#3B0366' },
176
+
177
+ { name: 'fuchsia-50', hex: '#FCF3FE' },
178
+ { name: 'fuchsia-100', hex: '#FAE7FF' },
179
+ { name: 'fuchsia-200', hex: '#F5CFFF' },
180
+ { name: 'fuchsia-300', hex: '#F3A7FF' },
181
+ { name: 'fuchsia-400', hex: '#ED6AFF' },
182
+ { name: 'fuchsia-500', hex: '#E12AFB' },
183
+ { name: 'fuchsia-600', hex: '#C700DE' },
184
+ { name: 'fuchsia-700', hex: '#A700B7' },
185
+ { name: 'fuchsia-800', hex: '#8A0194' },
186
+ { name: 'fuchsia-900', hex: '#721377' },
187
+ { name: 'fuchsia-950', hex: '#4A004F' },
188
+
189
+ { name: 'pink-50', hex: '#FCF1F7' },
190
+ { name: 'pink-100', hex: '#FCE6F3' },
191
+ { name: 'pink-200', hex: '#FBCEE8' },
192
+ { name: 'pink-300', hex: '#FDA4D5' },
193
+ { name: 'pink-400', hex: '#FB63B6' },
194
+ { name: 'pink-500', hex: '#F6329A' },
195
+ { name: 'pink-600', hex: '#E50076' },
196
+ { name: 'pink-700', hex: '#C6005B' },
197
+ { name: 'pink-800', hex: '#A2004C' },
198
+ { name: 'pink-900', hex: '#851042' },
199
+ { name: 'pink-950', hex: '#510323' },
200
+
201
+ { name: 'rose-50', hex: '#FEF0F1' },
202
+ { name: 'rose-100', hex: '#FFE3E5' },
203
+ { name: 'rose-200', hex: '#FFCCD2' },
204
+ { name: 'rose-300', hex: '#FFA0AD' },
205
+ { name: 'rose-400', hex: '#FF637E' },
206
+ { name: 'rose-500', hex: '#FF1F56' },
207
+ { name: 'rose-600', hex: '#EC003F' },
208
+ { name: 'rose-700', hex: '#C60035' },
209
+ { name: 'rose-800', hex: '#A40035' },
210
+ { name: 'rose-900', hex: '#8A0735' },
211
+ { name: 'rose-950', hex: '#4D0218' },
212
+
213
+ { name: 'slate-50', hex: '#F8F9FB' },
214
+ { name: 'slate-100', hex: '#F0F4F9' },
215
+ { name: 'slate-200', hex: '#E1E8F0' },
216
+ { name: 'slate-300', hex: '#CAD5E2' },
217
+ { name: 'slate-400', hex: '#90A1B8' },
218
+ { name: 'slate-500', hex: '#61738D' },
219
+ { name: 'slate-600', hex: '#45556C' },
220
+ { name: 'slate-700', hex: '#314157' },
221
+ { name: 'slate-800', hex: '#1C283C' },
222
+ { name: 'slate-900', hex: '#0E162B' },
223
+ { name: 'slate-950', hex: '#010517' },
224
+
225
+ { name: 'gray-50', hex: '#F8FAFB' },
226
+ { name: 'gray-100', hex: '#F2F4F6' },
227
+ { name: 'gray-200', hex: '#E5E7EB' },
228
+ { name: 'gray-300', hex: '#D0D5DB' },
229
+ { name: 'gray-400', hex: '#99A1AE' },
230
+ { name: 'gray-500', hex: '#697282' },
231
+ { name: 'gray-600', hex: '#495565' },
232
+ { name: 'gray-700', hex: '#354152' },
233
+ { name: 'gray-800', hex: '#1D2838' },
234
+ { name: 'gray-900', hex: '#101727' },
235
+ { name: 'gray-950', hex: '#020712' },
236
+
237
+ { name: 'zinc-50', hex: '#F9F9F9' },
238
+ { name: 'zinc-100', hex: '#F3F3F4' },
239
+ { name: 'zinc-200', hex: '#E4E4E7' },
240
+ { name: 'zinc-300', hex: '#D3D3D8' },
241
+ { name: 'zinc-400', hex: '#9E9EA9' },
242
+ { name: 'zinc-500', hex: '#70707B' },
243
+ { name: 'zinc-600', hex: '#51515C' },
244
+ { name: 'zinc-700', hex: '#3E3E46' },
245
+ { name: 'zinc-800', hex: '#26262A' },
246
+ { name: 'zinc-900', hex: '#17171A' },
247
+ { name: 'zinc-950', hex: '#09090B' },
248
+
249
+ { name: 'neutral-50', hex: '#F9F9F9' },
250
+ { name: 'neutral-100', hex: '#F4F4F4' },
251
+ { name: 'neutral-200', hex: '#E5E5E5' },
252
+ { name: 'neutral-300', hex: '#D4D4D4' },
253
+ { name: 'neutral-400', hex: '#A0A0A0' },
254
+ { name: 'neutral-500', hex: '#737373' },
255
+ { name: 'neutral-600', hex: '#525252' },
256
+ { name: 'neutral-700', hex: '#3F3F3F' },
257
+ { name: 'neutral-800', hex: '#262626' },
258
+ { name: 'neutral-900', hex: '#171717' },
259
+ { name: 'neutral-950', hex: '#0A0A0A' },
260
+
261
+ { name: 'stone-50', hex: '#FAFAF9' },
262
+ { name: 'stone-100', hex: '#F5F5F4' },
263
+ { name: 'stone-200', hex: '#E7E4E3' },
264
+ { name: 'stone-300', hex: '#D6D3D0' },
265
+ { name: 'stone-400', hex: '#A69F9B' },
266
+ { name: 'stone-500', hex: '#78706B' },
267
+ { name: 'stone-600', hex: '#57524D' },
268
+ { name: 'stone-700', hex: '#443F3B' },
269
+ { name: 'stone-800', hex: '#292423' },
270
+ { name: 'stone-900', hex: '#1B1817' },
271
+ { name: 'stone-950', hex: '#0B0A09' }
272
+ ]
273
+ end
274
+ end
275
+ end
@@ -1,5 +1,5 @@
1
- # frozen_string_literal: true
2
-
3
- module ColorSwatchCollection
4
- VERSION = '0.1.0'
5
- end
1
+ # frozen_string_literal: true
2
+
3
+ module ColorSwatchCollection
4
+ VERSION = '0.1.1'
5
+ end
@@ -1,86 +1,92 @@
1
- # frozen_string_literal: true
2
-
3
- require 'active_support/core_ext/object/blank'
4
-
5
- require_relative 'color_swatch_collection/version'
6
-
7
- require_relative 'color_swatch_collection/basic'
8
- require_relative 'color_swatch_collection/html'
9
- require_relative 'color_swatch_collection/ntc'
10
- require_relative 'color_swatch_collection/pantone'
11
- require_relative 'color_swatch_collection/roygbiv'
12
- require_relative 'color_swatch_collection/x11'
13
-
14
- module ColorSwatchCollection
15
- class Error < StandardError; end
16
-
17
- def self.list_collections
18
- ['basic', 'html', 'ntc', 'pantone', 'roygbiv', 'x11']
19
- end
20
-
21
- def self.get_from_hex(colour_hex, pick: [], omit: [])
22
- found_colour = nil
23
-
24
- self.list_collections.each do |list_name|
25
- next unless (pick.empty? || pick.include?(list_name)) && !omit.include?(list_name)
26
-
27
- found_colour = self.get_item_from_collection(colour_hex, 'hex', list_name)
28
-
29
- if found_colour.present?
30
- found_colour[:collection] = list_name
31
- break
32
- end
33
- end
34
-
35
- found_colour || {}
36
- end
37
-
38
- def self.get_from_name(colour_name, pick: [], omit: [])
39
- found_colour = nil
40
-
41
- self.list_collections.each do |list_name|
42
- next unless (pick.empty? || pick.include?(list_name)) && !omit.include?(list_name)
43
-
44
- found_colour = self.get_item_from_collection(colour_name, 'name', list_name)
45
-
46
- if found_colour.present?
47
- found_colour[:collection] = list_name
48
- break
49
- end
50
- end
51
-
52
- found_colour || {}
53
- end
54
-
55
- def self.get_colours(pick: [], omit: [])
56
- self.list_collections.collect do |list_name|
57
- next unless (pick.empty? || pick.include?(list_name)) && !omit.include?(list_name)
58
-
59
- Object.const_get("ColorSwatchCollection::#{list_name.capitalize}").colours.collect do |swatch_hash|
60
- swatch_hash[:collection] = list_name
61
- swatch_hash
62
- end
63
- end.compact.flatten
64
- end
65
-
66
- private
67
-
68
- def self.get_item_from_collection(colour_input, input_type, list_name)
69
- return nil if colour_input.blank?
70
-
71
- swatch_hash = nil
72
- list_collection_object = Object.const_get("ColorSwatchCollection::#{list_name.capitalize}")
73
-
74
- if input_type == 'hex'
75
- swatch_hash = list_collection_object.colours.find { |swatch| swatch[:hex] == colour_input.upcase }
76
- elsif input_type == 'name'
77
- if ['ntc', 'pantone'].include?(list_name)
78
- swatch_hash = list_collection_object.colours.find { |swatch| swatch[:name] == colour_input.downcase.strip }
79
- else
80
- swatch_hash = list_collection_object.colours.find { |swatch| swatch[:name] == colour_input.downcase.gsub(' ', '') }
81
- end
82
- end
83
-
84
- swatch_hash || {}
85
- end
86
- end
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/core_ext/object/blank'
4
+ require 'active_support/core_ext/string/inflections'
5
+
6
+ require_relative 'color_swatch_collection/version'
7
+
8
+ require_relative 'color_swatch_collection/basic'
9
+ require_relative 'color_swatch_collection/html'
10
+ require_relative 'color_swatch_collection/ntc'
11
+ require_relative 'color_swatch_collection/pantone'
12
+ require_relative 'color_swatch_collection/roygbiv'
13
+ require_relative 'color_swatch_collection/x11'
14
+
15
+ require_relative 'color_swatch_collection/tailwind/tailwind_v1'
16
+ require_relative 'color_swatch_collection/tailwind/tailwind_v2'
17
+ require_relative 'color_swatch_collection/tailwind/tailwind_v3'
18
+ require_relative 'color_swatch_collection/tailwind/tailwind_v4'
19
+
20
+ module ColorSwatchCollection
21
+ class Error < StandardError; end
22
+
23
+ def self.list_collections
24
+ ['basic', 'html', 'ntc', 'pantone', 'roygbiv', 'x11', 'tailwind_v1', 'tailwind_v2', 'tailwind_v3', 'tailwind_v4']
25
+ end
26
+
27
+ def self.get_from_hex(colour_hex, pick: [], omit: [])
28
+ found_colour = nil
29
+
30
+ self.list_collections.each do |list_name|
31
+ next unless (pick.empty? || pick.include?(list_name)) && !omit.include?(list_name)
32
+
33
+ found_colour = self.get_item_from_collection(colour_hex, 'hex', list_name)
34
+
35
+ if found_colour.present?
36
+ found_colour[:collection] = list_name
37
+ break
38
+ end
39
+ end
40
+
41
+ found_colour || {}
42
+ end
43
+
44
+ def self.get_from_name(colour_name, pick: [], omit: [])
45
+ found_colour = nil
46
+
47
+ self.list_collections.each do |list_name|
48
+ next unless (pick.empty? || pick.include?(list_name)) && !omit.include?(list_name)
49
+
50
+ found_colour = self.get_item_from_collection(colour_name, 'name', list_name)
51
+
52
+ if found_colour.present?
53
+ found_colour[:collection] = list_name
54
+ break
55
+ end
56
+ end
57
+
58
+ found_colour || {}
59
+ end
60
+
61
+ def self.get_colours(pick: [], omit: [])
62
+ self.list_collections.collect do |list_name|
63
+ next unless (pick.empty? || pick.include?(list_name)) && !omit.include?(list_name)
64
+
65
+ Object.const_get("ColorSwatchCollection::#{list_name.classify}").colours.collect do |swatch_hash|
66
+ swatch_hash[:collection] = list_name
67
+ swatch_hash
68
+ end
69
+ end.compact.flatten
70
+ end
71
+
72
+ private
73
+
74
+ def self.get_item_from_collection(colour_input, input_type, list_name)
75
+ return nil if colour_input.blank?
76
+
77
+ swatch_hash = nil
78
+ list_collection_object = Object.const_get("ColorSwatchCollection::#{list_name.classify}")
79
+
80
+ if input_type == 'hex'
81
+ swatch_hash = list_collection_object.colours.find { |swatch| swatch[:hex] == colour_input.upcase }
82
+ elsif input_type == 'name'
83
+ if ['ntc', 'pantone'].include?(list_name)
84
+ swatch_hash = list_collection_object.colours.find { |swatch| swatch[:name] == colour_input.downcase.strip }
85
+ else
86
+ swatch_hash = list_collection_object.colours.find { |swatch| swatch[:name] == colour_input.downcase.gsub(' ', '') }
87
+ end
88
+ end
89
+
90
+ swatch_hash || {}
91
+ end
92
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: color_swatch_collection
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
  - Louis Davis
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-08-19 00:00:00.000000000 Z
10
+ date: 2025-08-27 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activesupport
@@ -39,6 +39,10 @@ files:
39
39
  - lib/color_swatch_collection/ntc.rb
40
40
  - lib/color_swatch_collection/pantone.rb
41
41
  - lib/color_swatch_collection/roygbiv.rb
42
+ - lib/color_swatch_collection/tailwind/tailwind_v1.rb
43
+ - lib/color_swatch_collection/tailwind/tailwind_v2.rb
44
+ - lib/color_swatch_collection/tailwind/tailwind_v3.rb
45
+ - lib/color_swatch_collection/tailwind/tailwind_v4.rb
42
46
  - lib/color_swatch_collection/version.rb
43
47
  - lib/color_swatch_collection/x11.rb
44
48
  homepage: https://github.com/louiswdavis/color_swatch_collection