rainbow_unicorn 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8148d955919464ca9b385265aa146629ee98375a445bbcbb9f0ef41af80d7890
4
+ data.tar.gz: ef6831f1b8fde2b11028558b640520b7278cb226cb69ff8862de62b1f8aa00a8
5
+ SHA512:
6
+ metadata.gz: e3c3ea5e3361df9b37bcefd78a57c27e3012c7e7a57e6991d291d9c61e25cc149a6cfb7d000515824a1f90024b93ceba0fafca3670fc08f30d882b4dd13cb13a
7
+ data.tar.gz: a944337e5b2d217285ae779dd90489ddd8b8ec85e08032fd7db12681b4dc9d6fbbd924aa4da7d916260511fe9643bcc5957275b4b3c8bccc07d14d11a5d474a9
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.2.2
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2023-10-09
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at joel@drapper.me. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in rainbow_unicorn.gemspec
6
+ gemspec
7
+
8
+ gem "green_dots", path: "../green_dots"
data/Gemfile.lock ADDED
@@ -0,0 +1,34 @@
1
+ PATH
2
+ remote: ../green_dots
3
+ specs:
4
+ green_dots (0.1.0)
5
+ concurrent-ruby
6
+ prism
7
+ rouge
8
+ tty-tree
9
+ zeitwerk
10
+
11
+ PATH
12
+ remote: .
13
+ specs:
14
+ rainbow_unicorn (0.1.0)
15
+ zeitwerk
16
+
17
+ GEM
18
+ remote: https://rubygems.org/
19
+ specs:
20
+ concurrent-ruby (1.2.2)
21
+ prism (0.13.0)
22
+ rouge (4.1.3)
23
+ tty-tree (0.4.0)
24
+ zeitwerk (2.6.12)
25
+
26
+ PLATFORMS
27
+ arm64-darwin-22
28
+
29
+ DEPENDENCIES
30
+ green_dots!
31
+ rainbow_unicorn!
32
+
33
+ BUNDLED WITH
34
+ 2.4.12
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Joel Drapper
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # RainbowUnicorn
2
+
3
+ Documentation coming later
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["test/**/test_*.rb"]
10
+ end
11
+
12
+ task default: :test
@@ -0,0 +1,135 @@
1
+ module RainbowUnicorn
2
+ class Color
3
+ def initialize(r, g, b)
4
+ unless Integer === r && Integer === g && Integer === b
5
+ raise TypeError, "rgb values must be integers"
6
+ end
7
+
8
+ unless (0..255) === r && (0..255) === g && (0..255) === b
9
+ raise TypeError, "rgb values must be between 0 and 255"
10
+ end
11
+
12
+ @rgb = [r, g, b].freeze
13
+ freeze
14
+ end
15
+
16
+ def self.from_hsl(h, s, l)
17
+ unless (0..360) === h && (0..1) === s && (0..1) === l
18
+ raise TypeError, "hsl values must be between 0 and 360 for h and 0 and 1 for s and l"
19
+ end
20
+
21
+ c = (1 - (2 * l - 1).abs) * s
22
+ x = c * (1 - ((h / 60.0) % 2 - 1).abs)
23
+ m = l - c / 2.0
24
+
25
+ r1, g1, b1 = if h < 60
26
+ [c, x, 0]
27
+ elsif h < 120
28
+ [x, c, 0]
29
+ elsif h < 180
30
+ [0, c, x]
31
+ elsif h < 240
32
+ [0, x, c]
33
+ elsif h < 300
34
+ [x, 0, c]
35
+ else
36
+ [c, 0, x]
37
+ end
38
+
39
+ r = ((r1 + m) * 255).round
40
+ g = ((g1 + m) * 255).round
41
+ b = ((b1 + m) * 255).round
42
+
43
+ new(r, g, b)
44
+ end
45
+
46
+ def self.from_hex(hex)
47
+ unless String === hex && hex.length == 6
48
+ raise ArgumentError, "Invalid hex color"
49
+ end
50
+
51
+ r, g, b = hex.scan(/../).map { |color| color.to_i(16) }
52
+ new(r, g, b)
53
+ end
54
+
55
+ def hsl
56
+ rgb = @rgb.map { |c| c / 255.0 }
57
+ max, min = rgb.max, rgb.min
58
+
59
+ r, g, b = rgb
60
+ h, s, l = 0, 0, (max + min) / 2.0
61
+
62
+ if max != min
63
+ d = max - min
64
+ s = l > 0.5 ? d / (2.0 - max - min) : d / (max + min)
65
+ case max
66
+ when r
67
+ h = (g - b) / d + (g < b ? 6.0 : 0)
68
+ when g
69
+ h = (b - r) / d + 2.0
70
+ when b
71
+ h = (r - g) / d + 4.0
72
+ end
73
+ h /= 6.0
74
+ end
75
+
76
+ [h * 360, s, l]
77
+ end
78
+
79
+ attr_reader :rgb
80
+ alias_method :to_a, :rgb
81
+ alias_method :deconstruct, :rgb
82
+
83
+ def to_h
84
+ { r: @rgb[0], g: @rgb[1], b: @rgb[2] }
85
+ end
86
+
87
+ def deconstruct_keys(keys)
88
+ { r: @rgb[0], g: @rgb[1], b: @rgb[2] }
89
+ end
90
+
91
+ def inspect
92
+ "#{self.class.name}(#{@rgb.join(', ')})"
93
+ end
94
+
95
+ def hex
96
+ "##{rgb.map { |c| c.to_s(16).rjust(2, '0') }.join}"
97
+ end
98
+
99
+ def to_s
100
+ "rgb(#{rgb.join(', ')})"
101
+ end
102
+
103
+ alias_method :r, def red
104
+ @rgb[0]
105
+ end
106
+
107
+ alias_method :g, def green
108
+ @rgb[1]
109
+ end
110
+
111
+ alias_method :b, def blue
112
+ @rgb[2]
113
+ end
114
+
115
+ def lighten(amount)
116
+ h, s, l = hsl
117
+ self.class.from_hsl(h, s, [(l + amount), 1].min)
118
+ end
119
+
120
+ def darken(amount)
121
+ h, s, l = hsl
122
+ self.class.from_hsl(h, s, [(l - amount), 0].max)
123
+ end
124
+
125
+ def saturate(amount)
126
+ h, s, l = hsl
127
+ self.class.from_hsl(h, [(s + amount), 1].min, l)
128
+ end
129
+
130
+ def desaturate(amount)
131
+ h, s, l = hsl
132
+ self.class.from_hsl(h, [(s - amount), 0].max, l)
133
+ end
134
+ end
135
+ end
@@ -0,0 +1,111 @@
1
+
2
+ test "invalid rgb values" do
3
+ expect { RainbowUnicorn::Color.new(256, 0, 0) }.to_raise(TypeError)
4
+ expect { RainbowUnicorn::Color.new(0, 256, 0) }.to_raise(TypeError)
5
+ expect { RainbowUnicorn::Color.new(0, 0, 256) }.to_raise(TypeError)
6
+
7
+ expect { RainbowUnicorn::Color.new(-1, 0, 0) }.to_raise(TypeError)
8
+ expect { RainbowUnicorn::Color.new(0, -1, 0) }.to_raise(TypeError)
9
+ expect { RainbowUnicorn::Color.new(0, 0, -1) }.to_raise(TypeError)
10
+
11
+ expect { RainbowUnicorn::Color.new(0.5, 0, 0) }.to_raise(TypeError)
12
+ expect { RainbowUnicorn::Color.new(0, 0.5, 0) }.to_raise(TypeError)
13
+ expect { RainbowUnicorn::Color.new(0, 0, 0.5) }.to_raise(TypeError)
14
+ end
15
+
16
+ test ".from_hsl" do
17
+ expect(
18
+ RainbowUnicorn::Color.from_hsl(0, 0, 0.39).rgb
19
+ ) == [99, 99, 99]
20
+ end
21
+
22
+ test ".from_hex" do
23
+ expect(
24
+ RainbowUnicorn::Color.from_hex("646464").rgb
25
+ ) == [100, 100, 100]
26
+ end
27
+
28
+ test "rgb" do
29
+ expect(
30
+ RainbowUnicorn::Color.new(100, 100, 100).rgb
31
+ ) == [100, 100, 100]
32
+ end
33
+
34
+ test "hex" do
35
+ expect(
36
+ RainbowUnicorn::Color.new(100, 100, 100).hex
37
+ ) == "#646464"
38
+ end
39
+
40
+ test "hsl" do
41
+ expect(
42
+ RainbowUnicorn::Color.new(100, 100, 100).hsl.map { _1.round(2) }
43
+ ) == [0, 0, 0.39]
44
+ end
45
+
46
+ test "red, green, blue" do
47
+ color = RainbowUnicorn::Color.new(1, 2, 3)
48
+
49
+ expect(color.red) == 1
50
+ expect(color.r) == 1
51
+
52
+ expect(color.green) == 2
53
+ expect(color.g) == 2
54
+
55
+ expect(color.blue) == 3
56
+ expect(color.b) == 3
57
+ end
58
+
59
+ test "lighten" do
60
+ expect(
61
+ RainbowUnicorn::Color.new(100, 100, 100).lighten(0.1).rgb
62
+ ) == [126, 126, 126]
63
+ end
64
+
65
+ test "darken" do
66
+ expect(
67
+ RainbowUnicorn::Color.new(100, 100, 100).darken(0.1).rgb
68
+ ) == [74, 74, 74]
69
+ end
70
+
71
+ test "saturate" do
72
+ expect(
73
+ RainbowUnicorn::Color.new(100, 100, 100).saturate(0.1).rgb
74
+ ) == [110, 90, 90]
75
+ end
76
+
77
+ test "desaturate" do
78
+ expect(
79
+ RainbowUnicorn::Color.new(50, 60, 70).desaturate(0.1).rgb
80
+ ) == [56, 60, 64]
81
+ end
82
+
83
+ test "to_s" do
84
+ expect(
85
+ RainbowUnicorn::Color.new(100, 100, 100).to_s
86
+ ) == "rgb(100, 100, 100)"
87
+ end
88
+
89
+ test "to_h" do
90
+ expect(
91
+ RainbowUnicorn::Color.new(100, 100, 100).to_h
92
+ ) == { r: 100, g: 100, b: 100 }
93
+ end
94
+
95
+ test "deconstruct" do
96
+ expect(
97
+ RainbowUnicorn::Color.new(100, 100, 100).deconstruct
98
+ ) == [100, 100, 100]
99
+ end
100
+
101
+ test "deconstruct_keys" do
102
+ expect(
103
+ RainbowUnicorn::Color.new(100, 100, 100).deconstruct_keys([:r, :g, :b])
104
+ ) == { r: 100, g: 100, b: 100 }
105
+ end
106
+
107
+ test "inspect" do
108
+ expect(
109
+ RainbowUnicorn::Color.new(100, 100, 100).inspect
110
+ ) == "RainbowUnicorn::Color(100, 100, 100)"
111
+ end
@@ -0,0 +1,39 @@
1
+ # https://github.com/kepano/flexoki
2
+ module RainbowUnicorn
3
+ FlexokiDark = Palette.define(
4
+ bg: [16, 15, 15],
5
+ bg2: [28, 27, 26],
6
+
7
+ ui: [40, 39, 38],
8
+ ui2: [52, 51, 49],
9
+ ui3: [64, 62, 60],
10
+
11
+ tx3: [87, 86, 83],
12
+ tx2: [135, 133, 128],
13
+ tx: [206, 205, 195],
14
+
15
+ re: [209, 77, 65],
16
+ re2: [175, 48, 41],
17
+
18
+ or: [218, 112, 44],
19
+ or2: [188, 82, 21],
20
+
21
+ ye: [208, 162, 21],
22
+ ye2: [173, 131, 1],
23
+
24
+ gr: [135, 154, 57],
25
+ gr2: [102, 128, 11],
26
+
27
+ cy: [58, 169, 159],
28
+ cy2: [36, 131, 123],
29
+
30
+ bl: [67, 133, 190],
31
+ bl2: [32, 94, 166],
32
+
33
+ pu: [139, 126, 200],
34
+ pu2: [94, 64, 157],
35
+
36
+ ma: [206, 93, 151],
37
+ ma2: [160, 47, 111],
38
+ )
39
+ end
@@ -0,0 +1,39 @@
1
+ # https://github.com/kepano/flexoki
2
+ module RainbowUnicorn
3
+ FlexokiLight = Palette.define(
4
+ bg: [255, 252, 240],
5
+ bg2: [242, 240, 229],
6
+
7
+ ui: [230, 228, 217],
8
+ ui2: [218, 216, 206],
9
+ ui3: [206, 205, 195],
10
+
11
+ tx3: [183, 181, 172],
12
+ tx2: [111, 110, 105],
13
+ tx: [16, 15, 15],
14
+
15
+ re: [175, 48, 41],
16
+ re2: [209, 77, 65],
17
+
18
+ or: [188, 82, 21],
19
+ or2: [218, 112, 44],
20
+
21
+ ye: [173, 131, 1],
22
+ ye2: [208, 162, 21],
23
+
24
+ gr: [102, 128, 11],
25
+ gr2: [135, 154, 57],
26
+
27
+ cy: [36, 131, 123],
28
+ cy2: [58, 169, 159],
29
+
30
+ bl: [32, 94, 166],
31
+ bl2: [67, 133, 190],
32
+
33
+ pu: [94, 64, 157],
34
+ pu2: [139, 126, 200],
35
+
36
+ ma: [160, 47, 111],
37
+ ma2: [206, 93, 151]
38
+ )
39
+ end
@@ -0,0 +1,12 @@
1
+ module RainbowUnicorn
2
+ Monokai = Palette.define(
3
+ slate: [54, 50, 56],
4
+ pearl: [252, 249, 244],
5
+ grapefruit: [237, 108, 137],
6
+ peach: [238, 157, 112],
7
+ pineapple: [249, 217, 120],
8
+ kiwi: [180, 219, 130],
9
+ spirulina: [144, 218, 130],
10
+ lavender: [168, 158, 236],
11
+ )
12
+ end
@@ -0,0 +1,16 @@
1
+ # https://github.com/atom/atom/blob/master/packages/one-dark-syntax/styles/colors.less
2
+ module RainbowUnicorn
3
+ OneDark = Palette.define(
4
+ mono1: [171, 178, 191],
5
+ mono2: [130, 137, 151],
6
+ mono3: [92, 99, 112],
7
+ cyan: [86, 182, 194],
8
+ blue: [97, 175, 239],
9
+ purple: [198, 120, 221],
10
+ green: [152, 195, 121],
11
+ red1: [224, 108, 117],
12
+ red2: [190, 80, 70],
13
+ orange1: [209, 154, 102],
14
+ orange2: [229, 192, 123],
15
+ )
16
+ end
@@ -0,0 +1,16 @@
1
+ # https://github.com/atom/atom/blob/master/packages/one-light-syntax/styles/colors.less
2
+ module RainbowUnicorn
3
+ OneLight = Palette.define(
4
+ mono1: [56, 58, 66],
5
+ mono2: [105, 108, 119],
6
+ mono3: [160, 161, 167],
7
+ cyan: [1, 188, 150],
8
+ blue: [64, 120, 242],
9
+ purple: [166, 38, 164],
10
+ green: [80, 161, 79],
11
+ red1: [228, 86, 73],
12
+ red2: [202, 18, 67],
13
+ orange1: [183, 107, 1],
14
+ orange2: [203, 119, 1],
15
+ )
16
+ end
@@ -0,0 +1,49 @@
1
+ module RainbowUnicorn
2
+ class Palette
3
+ def self.define(**colors)
4
+ new(
5
+ colors.transform_values { |rgb| RainbowUnicorn::Color.new(*rgb) }
6
+ )
7
+ end
8
+
9
+ def initialize(colors)
10
+ @colors = colors.freeze
11
+ freeze
12
+ end
13
+
14
+ def each(&)
15
+ @colors.each(&)
16
+ end
17
+
18
+ def names
19
+ @colors.keys
20
+ end
21
+
22
+ def each_name(&)
23
+ @colors.keys.each(&)
24
+ end
25
+
26
+ def colors
27
+ @colors.values
28
+ end
29
+
30
+ alias_method :to_a, :colors
31
+ alias_method :to_ary, :colors
32
+
33
+ def each_color(&)
34
+ @colors.values.each(&)
35
+ end
36
+
37
+ def rgb_colors
38
+ @colors.values.map(&:rgb)
39
+ end
40
+
41
+ def to_h
42
+ @colors
43
+ end
44
+
45
+ def [](code)
46
+ @colors[code]
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,20 @@
1
+ # https://rosepinetheme.com/palette/ingredients/
2
+ module RainbowUnicorn
3
+ RoséPine = Palette.define(
4
+ base: [25, 23, 36],
5
+ surface: [31, 29, 46],
6
+ overlay: [38, 35, 58],
7
+ muted: [110, 106, 134],
8
+ subtle: [144, 140, 170],
9
+ text: [224, 222, 244],
10
+ love: [235, 111, 146],
11
+ gold: [246, 193, 119],
12
+ rose: [235, 188, 186],
13
+ pine: [49, 116, 143],
14
+ foam: [156, 207, 216],
15
+ iris: [196, 167, 231],
16
+ highlight_low: [33, 32, 46],
17
+ highlight_med: [64, 61, 82],
18
+ highlight_high: [82, 79, 103],
19
+ )
20
+ end
@@ -0,0 +1,20 @@
1
+ # https://rosepinetheme.com/palette/ingredients/
2
+ module RainbowUnicorn
3
+ RoséPineDawn = Palette.define(
4
+ base: [250, 244, 237],
5
+ surface: [255, 250, 243],
6
+ overlay: [242, 233, 222],
7
+ muted: [152, 147, 165],
8
+ subtle: [121, 117, 147],
9
+ text: [87, 82, 121],
10
+ love: [180, 99, 122],
11
+ gold: [234, 157, 52],
12
+ rose: [215, 130, 126],
13
+ pine: [40, 105, 131],
14
+ foam: [86, 148, 159],
15
+ iris: [144, 122, 169],
16
+ highlight_low: [244, 237, 232],
17
+ highlight_med: [223, 218, 217],
18
+ highlight_high: [206, 202, 205],
19
+ )
20
+ end
@@ -0,0 +1,20 @@
1
+ # https://rosepinetheme.com/palette/ingredients/
2
+ module RainbowUnicorn
3
+ RoséPineMoon = Color.define(
4
+ base: [35, 33, 54],
5
+ surface: [42, 39, 63],
6
+ overlay: [57, 53, 82],
7
+ muted: [110, 106, 134],
8
+ subtle: [144, 140, 170],
9
+ text: [224, 222, 244],
10
+ love: [235, 111, 146],
11
+ gold: [246, 193, 119],
12
+ rose: [234, 154, 151],
13
+ pine: [62, 143, 176],
14
+ foam: [156, 207, 216],
15
+ iris: [196, 167, 231],
16
+ highlight_low: [42, 40, 62],
17
+ highlight_med: [68, 65, 90],
18
+ highlight_high: [86, 82, 110],
19
+ )
20
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RainbowUnicorn
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "zeitwerk"
4
+
5
+ module RainbowUnicorn
6
+ Loader = Zeitwerk::Loader.for_gem.tap do |loader|
7
+ loader.ignore("#{__dir__}/**/*.test.rb")
8
+ loader.setup
9
+ end
10
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/rainbow_unicorn/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "rainbow_unicorn"
7
+ spec.version = RainbowUnicorn::VERSION
8
+ spec.authors = ["Joel Drapper"]
9
+ spec.email = ["joel@drapper.me"]
10
+
11
+ spec.summary = "Colors for Ruby"
12
+ spec.homepage = "https://github.com/joeldrapper/rainbow_unicorn"
13
+ spec.license = "MIT"
14
+ spec.required_ruby_version = ">= 3.0.0"
15
+
16
+ spec.metadata["homepage_uri"] = spec.homepage
17
+ spec.metadata["source_code_uri"] = spec.homepage
18
+ spec.metadata["changelog_uri"] = spec.homepage
19
+
20
+ # Specify which files should be added to the gem when it is released.
21
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
+ spec.files = Dir.chdir(__dir__) do
23
+ `git ls-files -z`.split("\x0").reject do |f|
24
+ (File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor])
25
+ end
26
+ end
27
+
28
+ spec.require_paths = ["lib"]
29
+
30
+ spec.add_dependency "zeitwerk"
31
+ end
@@ -0,0 +1,4 @@
1
+ module RainbowUnicorn
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rainbow_unicorn
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Joel Drapper
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-11-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: zeitwerk
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description:
28
+ email:
29
+ - joel@drapper.me
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".ruby-version"
35
+ - CHANGELOG.md
36
+ - CODE_OF_CONDUCT.md
37
+ - Gemfile
38
+ - Gemfile.lock
39
+ - LICENSE.txt
40
+ - README.md
41
+ - Rakefile
42
+ - lib/rainbow_unicorn.rb
43
+ - lib/rainbow_unicorn/color.rb
44
+ - lib/rainbow_unicorn/color.test.rb
45
+ - lib/rainbow_unicorn/flexoki_dark.rb
46
+ - lib/rainbow_unicorn/flexoki_light.rb
47
+ - lib/rainbow_unicorn/monokai.rb
48
+ - lib/rainbow_unicorn/one_dark.rb
49
+ - lib/rainbow_unicorn/one_light.rb
50
+ - lib/rainbow_unicorn/palette.rb
51
+ - lib/rainbow_unicorn/rosé_pine.rb
52
+ - lib/rainbow_unicorn/rosé_pine_dawn.rb
53
+ - lib/rainbow_unicorn/rosé_pine_moon.rb
54
+ - lib/rainbow_unicorn/version.rb
55
+ - rainbow_unicorn.gemspec
56
+ - sig/rainbow_unicorn.rbs
57
+ homepage: https://github.com/joeldrapper/rainbow_unicorn
58
+ licenses:
59
+ - MIT
60
+ metadata:
61
+ homepage_uri: https://github.com/joeldrapper/rainbow_unicorn
62
+ source_code_uri: https://github.com/joeldrapper/rainbow_unicorn
63
+ changelog_uri: https://github.com/joeldrapper/rainbow_unicorn
64
+ post_install_message:
65
+ rdoc_options: []
66
+ require_paths:
67
+ - lib
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 3.0.0
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ requirements: []
79
+ rubygems_version: 3.4.10
80
+ signing_key:
81
+ specification_version: 4
82
+ summary: Colors for Ruby
83
+ test_files: []