color 2.0.0.pre.2 → 2.0.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 +4 -4
- data/CHANGELOG.md +6 -2
- data/CONTRIBUTING.md +3 -3
- data/LICENCE.md +3 -0
- data/Manifest.txt +1 -1
- data/README.md +2 -2
- data/Rakefile +4 -6
- data/lib/color/version.rb +1 -1
- data/lib/color.rb +12 -16
- metadata +38 -46
- /data/{licenses → licences}/dco.txt +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de0f595f559249d4eed1b1a71514d9b31caf458544b10d791b954b68d42ae169
|
4
|
+
data.tar.gz: 1d6680d9805b0556a7b865b5bf9bced7b089ed72c8889a7187ac30a082826efb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bb3c94216b72f936f2252de8b698ff28e8fbc240bee72fa5cd4d016f3a911de3755b8ba892cbe857a8f3f4a9aeaef4bd79132e14c4230eff2f047690a8940d2
|
7
|
+
data.tar.gz: 275c0cdaed2c2474eedc59a915910dca1573a95f35f7cf41a5758f60284dbb3402454b56c17fb0d833de0b57047dddde25df09f2211585fe5957be68ee1791f2
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## 2.0.
|
3
|
+
## 2.0.1 / 2025-07-05
|
4
|
+
|
5
|
+
Color 2.0.1 is a minor documentation update.
|
6
|
+
|
7
|
+
## 2.0.0 / 2025-07-05
|
4
8
|
|
5
9
|
Color 2.0.0 is a major release of the Color library.
|
6
10
|
|
@@ -8,7 +12,7 @@ Color 2.0.0 is a major release of the Color library.
|
|
8
12
|
|
9
13
|
Color 2.0 contains breaking changes. Functionality previously deprecated has
|
10
14
|
been removed, but other functionality has been changed or removed as part of
|
11
|
-
this release without warning.
|
15
|
+
this release without prior warning.
|
12
16
|
|
13
17
|
- The minimum supported version of Ruby is 3.2.
|
14
18
|
|
data/CONTRIBUTING.md
CHANGED
@@ -39,8 +39,8 @@ contributions. There are a few DOs and DON'Ts that should be followed.
|
|
39
39
|
Color is a library full of complex math and subtle decisions (some of them
|
40
40
|
possibly even wrong). It is extremely important that any issues or pull requests
|
41
41
|
be well understood by the submitter and that, especially for pull requests, the
|
42
|
-
developer can attest to the [Developer Certificate of Origin]
|
43
|
-
|
42
|
+
developer can attest to the [Developer Certificate of Origin][dco] for each pull
|
43
|
+
request (see [LICENCE](LICENCE.md)).
|
44
44
|
|
45
45
|
If LLM assistance is used in writing pull requests, this must be documented in
|
46
46
|
the commit message and pull request. If there is evidence of LLM assistance
|
@@ -77,8 +77,8 @@ Here's the most direct way to get your work merged into the project:
|
|
77
77
|
- Create a pull request against halostatue/color and describe what your change
|
78
78
|
does and the why you think it should be merged.
|
79
79
|
|
80
|
+
[dco]: licences/dco.txt
|
80
81
|
[hoe]: https://github.com/seattlerb/hoe
|
81
82
|
[minitest]: https://github.com/seattlerb/minitest
|
82
|
-
[mtd]: https://github.com/mime-types/mime-types-data
|
83
83
|
[qcm]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
|
84
84
|
[standardrb]: https://github.com/standardrb/standard
|
data/LICENCE.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Licence
|
2
2
|
|
3
|
+
- SPDX-License-Identifier: [MIT][mit]
|
4
|
+
|
3
5
|
- Copyright 2005-2025 Austin Ziegler, Matt Lyon, and other contributors.
|
4
6
|
|
5
7
|
The software in this repository is made available under the MIT license.
|
@@ -44,4 +46,5 @@ The `Signed-off-by` trailer can be automatically added by git with the `-s` or
|
|
44
46
|
git commit --signoff
|
45
47
|
```
|
46
48
|
|
49
|
+
[mit]: https://spdx.org/licenses/MIT.html
|
47
50
|
[trailer]: https://git-scm.com/docs/git-interpret-trailers
|
data/Manifest.txt
CHANGED
data/README.md
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
Color is a Ruby library to provide RGB, CMYK, HSL, and other color space
|
14
14
|
manipulation support to applications that require it. It provides optional named
|
15
|
-
RGB colors that are commonly supported in HTML,
|
15
|
+
RGB colors that are commonly supported in HTML, SVG, and X11 applications.
|
16
16
|
|
17
17
|
The Color library performs purely mathematical manipulation of the colors based
|
18
18
|
on color theory without reference to device color profiles (such as sRGB or
|
@@ -33,7 +33,7 @@ changes are:
|
|
33
33
|
- Color palettes have been removed.
|
34
34
|
- `Color::CSS` and `Color::CSS#[]` have been removed.
|
35
35
|
|
36
|
-
##
|
36
|
+
## Example
|
37
37
|
|
38
38
|
Suppose you want to make a given RGB color a little lighter. Adjusting the RGB
|
39
39
|
color curves will change the hue and saturation will also change. Instead, use
|
data/Rakefile
CHANGED
@@ -25,23 +25,22 @@ hoe = Hoe.spec "color" do
|
|
25
25
|
license "MIT"
|
26
26
|
|
27
27
|
spec_extras[:metadata] = ->(val) {
|
28
|
-
val
|
28
|
+
val["rubygems_mfa_required"] = "true"
|
29
29
|
}
|
30
30
|
|
31
31
|
extra_dev_deps << ["hoe", "~> 4.0"]
|
32
32
|
extra_dev_deps << ["hoe-halostatue", "~> 2.1", ">= 2.1.1"]
|
33
|
-
extra_dev_deps << ["hoe-doofus", "~> 1.0"]
|
34
|
-
extra_dev_deps << ["hoe-rubygems", "~> 1.0"]
|
35
|
-
extra_dev_deps << ["hoe-gemspec2", "~> 1.4"]
|
36
33
|
extra_dev_deps << ["hoe-git", "~> 1.6"]
|
37
34
|
extra_dev_deps << ["minitest", "~> 5.8"]
|
38
35
|
extra_dev_deps << ["minitest-autotest", "~> 1.0"]
|
39
36
|
extra_dev_deps << ["minitest-focus", "~> 1.1"]
|
40
37
|
extra_dev_deps << ["minitest-moar", "~> 0.0"]
|
41
38
|
extra_dev_deps << ["rake", ">= 10.0", "< 14"]
|
42
|
-
extra_dev_deps << ["rdoc", ">= 0.0"]
|
39
|
+
extra_dev_deps << ["rdoc", ">= 0.0", "< 7"]
|
43
40
|
extra_dev_deps << ["standard", "~> 1.0"]
|
44
41
|
extra_dev_deps << ["json", ">= 0.0"]
|
42
|
+
extra_dev_deps << ["simplecov", "~> 0.22"]
|
43
|
+
extra_dev_deps << ["simplecov-lcov", "~> 0.8"]
|
45
44
|
end
|
46
45
|
|
47
46
|
Minitest::TestTask.create :test
|
@@ -84,5 +83,4 @@ RDoc::Task.new do
|
|
84
83
|
_1.rdoc_files = hoe.spec.require_paths - ["Manifest.txt"] + hoe.spec.extra_rdoc_files
|
85
84
|
_1.markup = "markdown"
|
86
85
|
end
|
87
|
-
|
88
86
|
task docs: :rerdoc
|
data/lib/color/version.rb
CHANGED
data/lib/color.rb
CHANGED
@@ -7,29 +7,25 @@
|
|
7
7
|
# - **changelog**: [CHANGELOG](rdoc-ref:CHANGELOG.md)
|
8
8
|
#
|
9
9
|
# \Color is a Ruby library to provide RGB, CMYK, HSL, and other color space manipulation
|
10
|
-
# support to applications that require it. It provides
|
10
|
+
# support to applications that require it. It provides optional named RGB colors that are
|
11
11
|
# commonly supported in HTML, SVG, and X11 applications.
|
12
12
|
#
|
13
13
|
# The \Color library performs purely mathematical manipulation of the colors based on
|
14
14
|
# color theory without reference to device color profiles (such as sRGB or Adobe RGB). For
|
15
15
|
# most purposes, when working with RGB and HSL color spaces, this won't matter. Absolute
|
16
|
-
# color spaces (like CIE LAB and CIE XYZ)
|
17
|
-
#
|
18
|
-
#
|
16
|
+
# color spaces (like CIE LAB and CIE XYZ) cannot be reliably converted to relative color
|
17
|
+
# spaces (like RGB) without color profiles. When necessary for conversions, \Color
|
18
|
+
# provides \D65 and \D50 reference white values in Color::XYZ.
|
19
19
|
#
|
20
|
-
#
|
21
|
-
#
|
20
|
+
# Color 2.0 is a major release, dropping support for all versions of Ruby prior to 3.2 as
|
21
|
+
# well as removing or renaming a number of features. The main breaking changes are:
|
22
22
|
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
#
|
29
|
-
# `new` class method, instead using only `from_*` class methods. There is always
|
30
|
-
# a `from_values` class method which represents the native color channel values (which may
|
31
|
-
# not match the internal representation). This method _may_ have a counterpart that is
|
32
|
-
# recommended for readability.
|
23
|
+
# - Color classes are immutable Data objects; they are no longer mutable.
|
24
|
+
# - RGB named colors are no longer loaded on gem startup, but must be required explicitly
|
25
|
+
# (this is _not_ done via `autoload` because there are more than 100 named colors with
|
26
|
+
# spelling variations) with `require "color/rgb/colors"`.
|
27
|
+
# - Color palettes have been removed.
|
28
|
+
# - `Color::CSS` and `Color::CSS#[]` have been removed.
|
33
29
|
module Color
|
34
30
|
##
|
35
31
|
# The maximum "resolution" for color math; if any value is less than or equal to this
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: color
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Austin Ziegler
|
@@ -44,48 +44,6 @@ dependencies:
|
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 2.1.1
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: hoe-doofus
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - "~>"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '1.0'
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - "~>"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '1.0'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: hoe-rubygems
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '1.0'
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - "~>"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '1.0'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: hoe-gemspec2
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - "~>"
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '1.4'
|
82
|
-
type: :development
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - "~>"
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '1.4'
|
89
47
|
- !ruby/object:Gem::Dependency
|
90
48
|
name: hoe-git
|
91
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -183,6 +141,9 @@ dependencies:
|
|
183
141
|
- - ">="
|
184
142
|
- !ruby/object:Gem::Version
|
185
143
|
version: '0.0'
|
144
|
+
- - "<"
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '7'
|
186
147
|
type: :development
|
187
148
|
prerelease: false
|
188
149
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -190,6 +151,9 @@ dependencies:
|
|
190
151
|
- - ">="
|
191
152
|
- !ruby/object:Gem::Version
|
192
153
|
version: '0.0'
|
154
|
+
- - "<"
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '7'
|
193
157
|
- !ruby/object:Gem::Dependency
|
194
158
|
name: standard
|
195
159
|
requirement: !ruby/object:Gem::Requirement
|
@@ -218,10 +182,38 @@ dependencies:
|
|
218
182
|
- - ">="
|
219
183
|
- !ruby/object:Gem::Version
|
220
184
|
version: '0.0'
|
185
|
+
- !ruby/object:Gem::Dependency
|
186
|
+
name: simplecov
|
187
|
+
requirement: !ruby/object:Gem::Requirement
|
188
|
+
requirements:
|
189
|
+
- - "~>"
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: '0.22'
|
192
|
+
type: :development
|
193
|
+
prerelease: false
|
194
|
+
version_requirements: !ruby/object:Gem::Requirement
|
195
|
+
requirements:
|
196
|
+
- - "~>"
|
197
|
+
- !ruby/object:Gem::Version
|
198
|
+
version: '0.22'
|
199
|
+
- !ruby/object:Gem::Dependency
|
200
|
+
name: simplecov-lcov
|
201
|
+
requirement: !ruby/object:Gem::Requirement
|
202
|
+
requirements:
|
203
|
+
- - "~>"
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: '0.8'
|
206
|
+
type: :development
|
207
|
+
prerelease: false
|
208
|
+
version_requirements: !ruby/object:Gem::Requirement
|
209
|
+
requirements:
|
210
|
+
- - "~>"
|
211
|
+
- !ruby/object:Gem::Version
|
212
|
+
version: '0.8'
|
221
213
|
description: |-
|
222
214
|
Color is a Ruby library to provide RGB, CMYK, HSL, and other color space
|
223
215
|
manipulation support to applications that require it. It provides optional named
|
224
|
-
RGB colors that are commonly supported in HTML,
|
216
|
+
RGB colors that are commonly supported in HTML, SVG, and X11 applications.
|
225
217
|
|
226
218
|
The Color library performs purely mathematical manipulation of the colors based
|
227
219
|
on color theory without reference to device color profiles (such as sRGB or
|
@@ -255,7 +247,7 @@ extra_rdoc_files:
|
|
255
247
|
- Manifest.txt
|
256
248
|
- README.md
|
257
249
|
- SECURITY.md
|
258
|
-
-
|
250
|
+
- licences/dco.txt
|
259
251
|
files:
|
260
252
|
- CHANGELOG.md
|
261
253
|
- CODE_OF_CONDUCT.md
|
@@ -276,7 +268,7 @@ files:
|
|
276
268
|
- lib/color/version.rb
|
277
269
|
- lib/color/xyz.rb
|
278
270
|
- lib/color/yiq.rb
|
279
|
-
-
|
271
|
+
- licences/dco.txt
|
280
272
|
- test/fixtures/cielab.json
|
281
273
|
- test/minitest_helper.rb
|
282
274
|
- test/test_cmyk.rb
|
File without changes
|