@quenty/colorpalette 4.31.1-canary.405.6fa018e.0 → 4.32.0
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.
package/CHANGELOG.md
CHANGED
|
@@ -3,12 +3,19 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# [4.32.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/colorpalette@4.31.0...@quenty/colorpalette@4.32.0) (2023-08-23)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Bug Fixes
|
|
10
10
|
|
|
11
11
|
* Remove dead code ([b8719a7](https://github.com/Quenty/NevermoreEngine/commit/b8719a7abe0b7a34bc869064a5a1595499801598))
|
|
12
|
+
* Use table.clone instead of Table.copy ([44468bd](https://github.com/Quenty/NevermoreEngine/commit/44468bda58a95b5a17c5998807231124d2a55187))
|
|
13
|
+
* Vividness pass-though as messy ([9335e8d](https://github.com/Quenty/NevermoreEngine/commit/9335e8d2809de7c8768982addf03d6b64b60ea6a))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* Add ColorGradeUtils.addGradeToColor(color, difference, vividness) ([715abf8](https://github.com/Quenty/NevermoreEngine/commit/715abf8b497fb1c087e29266eb7c88ed538a2870))
|
|
12
19
|
|
|
13
20
|
|
|
14
21
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/colorpalette",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.32.0",
|
|
4
4
|
"description": "Color palette system for Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@quenty/baseobject": "6.
|
|
32
|
-
"@quenty/blend": "6.
|
|
33
|
-
"@quenty/color3utils": "5.
|
|
34
|
-
"@quenty/colorpicker": "4.
|
|
35
|
-
"@quenty/loader": "6.
|
|
36
|
-
"@quenty/maid": "2.
|
|
37
|
-
"@quenty/math": "2.
|
|
38
|
-
"@quenty/rx": "7.
|
|
39
|
-
"@quenty/signal": "2.4.0",
|
|
40
|
-
"@quenty/table": "3.
|
|
41
|
-
"@quenty/valueobject": "7.
|
|
31
|
+
"@quenty/baseobject": "^6.3.0",
|
|
32
|
+
"@quenty/blend": "^6.27.0",
|
|
33
|
+
"@quenty/color3utils": "^5.28.0",
|
|
34
|
+
"@quenty/colorpicker": "^4.29.0",
|
|
35
|
+
"@quenty/loader": "^6.3.0",
|
|
36
|
+
"@quenty/maid": "^2.6.0",
|
|
37
|
+
"@quenty/math": "^2.5.0",
|
|
38
|
+
"@quenty/rx": "^7.15.0",
|
|
39
|
+
"@quenty/signal": "^2.4.0",
|
|
40
|
+
"@quenty/table": "^3.3.0",
|
|
41
|
+
"@quenty/valueobject": "^7.22.0"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "3b7e47e2180964b6b0b156d07814810e063ef7ed"
|
|
44
44
|
}
|
|
@@ -42,6 +42,11 @@ function ColorGradeUtils.addGrade(grade, difference)
|
|
|
42
42
|
return finalGrade
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
+
function ColorGradeUtils.addGradeToColor(color, difference)
|
|
46
|
+
local grade = ColorGradeUtils.getGrade(color)
|
|
47
|
+
return ColorGradeUtils.getGradedColor(color, ColorGradeUtils.addGrade(grade, difference))
|
|
48
|
+
end
|
|
49
|
+
|
|
45
50
|
--[=[
|
|
46
51
|
Ensures the given contrast between the color and the backing, with
|
|
47
52
|
an adjustment to saturation to keep the UI loking good
|
|
@@ -65,7 +70,8 @@ function ColorGradeUtils.ensureGradeContrast(color, backing, amount)
|
|
|
65
70
|
return color
|
|
66
71
|
end
|
|
67
72
|
|
|
68
|
-
local
|
|
73
|
+
local direction = math.sign(rel) > 0 and 1 or -1
|
|
74
|
+
local newRel = direction*amount
|
|
69
75
|
|
|
70
76
|
local newGrade = math.clamp(backingGrade + newRel, 0, 100)
|
|
71
77
|
local otherNewGrade = math.clamp(backingGrade - newRel, 0, 100)
|