decolmor 1.1.1 → 1.1.2
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 +13 -6
- data/NEWS.md +9 -5
- data/README.md +15 -3
- data/lib/decolmor/main.rb +9 -0
- data/lib/decolmor/version.rb +1 -1
- data/lib/decolmor.rb +0 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 391babdff79d7e079f2282aa45ad285323c2b58b87e518bb2d26ad8e1192a4e3
|
4
|
+
data.tar.gz: 14aa6f29f76b05ab2e853e438e60b4e6705fb147a4ecebaccf1375778e88ad12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce61c17d0dbc5da49013777f8abc332354c681f566a03ee37ab959faa062176f48daa7e4495695580efa74d9b9383f4569be7b0f8fec63922a80730388bd267a
|
7
|
+
data.tar.gz: 6fdd75e6224a79e587dacb66de5d74444196dfc3b4ebb3f592ab689df8435d67150d7bc0751f81289d253c9f1884468b14a94f59bb7f6a972e625d29809f540a
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,17 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## 1.
|
3
|
+
## 1.1.2 (September 16, 2021)
|
4
4
|
|
5
|
-
*
|
5
|
+
* Migrate: Travis CI => Github Actions Workflow
|
6
|
+
* Fix: returned helper methods to private
|
7
|
+
* Now the main code is in one file: lib/decolmor/main.rb
|
8
|
+
You can just `include` it in and use it (separately from the gem)
|
9
|
+
|
10
|
+
## 1.1.1 (September 16, 2021)
|
11
|
+
|
12
|
+
* Now you can `include` the module into your class
|
13
|
+
* gem methods will be available as class methods
|
14
|
+
* Fixed default branch in .gemspec metadata paths
|
6
15
|
|
7
16
|
## 1.1.0 (September 14, 2021)
|
8
17
|
|
@@ -14,8 +23,6 @@
|
|
14
23
|
* support short version of HEX
|
15
24
|
e.g: `#CF3`, `0F9`, `#0F9F`
|
16
25
|
|
17
|
-
## 1.
|
26
|
+
## 1.0.0 (September 13, 2021)
|
18
27
|
|
19
|
-
*
|
20
|
-
* gem methods will be available as class methods
|
21
|
-
* Fixed default branch in .gemspec metadata paths
|
28
|
+
* Initial release
|
data/NEWS.md
CHANGED
@@ -1,14 +1,18 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
-
## 1.
|
3
|
+
## 1.1.2 (September 16, 2021)
|
4
4
|
|
5
|
-
*
|
5
|
+
* Migrate: Travis CI => Github Actions Workflow
|
6
|
+
|
7
|
+
## 1.1.1 (September 16, 2021)
|
8
|
+
|
9
|
+
* Now you can `include` the module into your class
|
10
|
+
* gem methods will be available as class methods
|
6
11
|
|
7
12
|
## 1.1.0 (September 14, 2021)
|
8
13
|
|
9
14
|
* `::hex_to_rgb` Now supports short version of HEX and rounding for the alpha channel
|
10
15
|
|
11
|
-
## 1.
|
16
|
+
## 1.0.0 (September 13, 2021)
|
12
17
|
|
13
|
-
*
|
14
|
-
* gem methods will be available as class methods
|
18
|
+
* First version
|
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# Decolmor
|
2
|
-
[![
|
3
|
-
[![
|
4
|
-
[![codecov]
|
2
|
+
[![badge-gem][badge-gem]][gem]
|
3
|
+
[![badge-build][badge-build]][github-workflow]
|
4
|
+
[![badge-codecov][badge-codecov]][codecov]
|
5
|
+
[![badge-license][badge-license]][license]
|
5
6
|
|
6
7
|
Gem for converting color spaces from/to: HEX/RGB/HSL/HSV/HSB/CMYK
|
7
8
|
The Alpha channel (transparency) is supported.
|
@@ -153,3 +154,14 @@ The results when rounded to an integer will be the same as when using graphics e
|
|
153
154
|
MIT License
|
154
155
|
Copyright (c) 2021 ChildrenofkoRn
|
155
156
|
[LICENSE](https://github.com/ChildrenofkoRn/decolmor/blob/master/LICENSE)
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
[gem]: https://badge.fury.io/rb/decolmor "gem version"
|
161
|
+
[badge-gem]: https://badge.fury.io/rb/decolmor.svg "gem version"
|
162
|
+
[codecov]: https://codecov.io/gh/ChildrenofkoRn/decolmor "codecov"
|
163
|
+
[badge-codecov]: https://codecov.io/gh/ChildrenofkoRn/decolmor/branch/main/graph/badge.svg?token=5P4OQUXC3N "codecov"
|
164
|
+
[github-workflow]: https://github.com/ChildrenofkoRn/decolmor/actions/workflows/build.yml "build"
|
165
|
+
[badge-build]: https://github.com/ChildrenofkoRn/decolmor/actions/workflows/build.yml/badge.svg "build status"
|
166
|
+
[license]: https://github.com/ChildrenofkoRn/decolmor/blob/main/LICENSE "MIT"
|
167
|
+
[badge-license]: https://img.shields.io/github/license/ChildrenofkoRn/decolmor?color=%23239393 "license"
|
data/lib/decolmor/main.rb
CHANGED
@@ -4,6 +4,13 @@ module Decolmor
|
|
4
4
|
base.extend ClassMethods
|
5
5
|
end
|
6
6
|
|
7
|
+
#========= Set default rounding for HSL/HSV/HSB/CMYK conversion ========
|
8
|
+
|
9
|
+
# round 1 enough for lossless conversion RGB -> HSL/HSV/HSB -> RGB
|
10
|
+
# for lossless conversion HSL <==> HSV (HSB) better to use round 2
|
11
|
+
#
|
12
|
+
HSX_ROUND = 1
|
13
|
+
|
7
14
|
module ClassMethods
|
8
15
|
|
9
16
|
attr_writer :hsx_round
|
@@ -256,6 +263,8 @@ module Decolmor
|
|
256
263
|
cmyk_arr.size == 5 ? rgb + [cmyk_arr.last] : rgb
|
257
264
|
end
|
258
265
|
|
266
|
+
private
|
267
|
+
|
259
268
|
#========= helper methods for RGB to HSL/HSB/HSV =======================
|
260
269
|
|
261
270
|
# find greatest and smallest channel values and chroma from RGB
|
data/lib/decolmor/version.rb
CHANGED
data/lib/decolmor.rb
CHANGED
@@ -2,10 +2,4 @@ require 'decolmor/main'
|
|
2
2
|
require 'decolmor/version'
|
3
3
|
|
4
4
|
module Decolmor
|
5
|
-
#========= Set default rounding for HSL/HSV/HSB/CMYK conversion ========
|
6
|
-
|
7
|
-
# round 1 enough for lossless conversion RGB -> HSL/HSV/HSB -> RGB
|
8
|
-
# for lossless conversion HSL <==> HSV (HSB) better to use round 2
|
9
|
-
#
|
10
|
-
HSX_ROUND = 1
|
11
5
|
end
|