@quenty/color3utils 11.18.3 → 11.18.4-canary.559.339cfa7.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,6 +3,17 @@
|
|
|
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
|
+
## [11.18.4-canary.559.339cfa7.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/color3utils@11.18.3...@quenty/color3utils@11.18.4-canary.559.339cfa7.0) (2025-05-10)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Additional type checking updates ([05ba29a](https://github.com/Quenty/NevermoreEngine/commit/05ba29a03efc9f3feed74b34f1d9dfb237496214))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [11.18.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/color3utils@11.18.2...@quenty/color3utils@11.18.3) (2025-04-10)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/color3utils
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/color3utils",
|
|
3
|
-
"version": "11.18.
|
|
3
|
+
"version": "11.18.4-canary.559.339cfa7.0",
|
|
4
4
|
"description": "Utility methods for Roblox Color3 values",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@quenty/blend": "
|
|
32
|
-
"@quenty/loader": "
|
|
33
|
-
"@quenty/maid": "
|
|
34
|
-
"@quenty/math": "
|
|
35
|
-
"@quenty/rx": "
|
|
36
|
-
"@quenty/valueobject": "
|
|
31
|
+
"@quenty/blend": "12.18.4-canary.559.339cfa7.0",
|
|
32
|
+
"@quenty/loader": "10.8.4-canary.559.339cfa7.0",
|
|
33
|
+
"@quenty/maid": "3.4.4-canary.559.339cfa7.0",
|
|
34
|
+
"@quenty/math": "2.7.3",
|
|
35
|
+
"@quenty/rx": "13.17.4-canary.559.339cfa7.0",
|
|
36
|
+
"@quenty/valueobject": "13.17.4-canary.559.339cfa7.0"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "339cfa778736f08768ed7305041f6221faa35bfc"
|
|
39
39
|
}
|
|
@@ -1,33 +1,35 @@
|
|
|
1
|
+
--!strict
|
|
1
2
|
--[[
|
|
2
3
|
@class LuvColor3Utils.story
|
|
3
4
|
]]
|
|
4
5
|
|
|
5
|
-
local require =
|
|
6
|
+
local require =
|
|
7
|
+
require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
|
|
6
8
|
|
|
7
|
-
local Maid = require("Maid")
|
|
8
9
|
local LuvColor3Utils = require("LuvColor3Utils")
|
|
10
|
+
local Maid = require("Maid")
|
|
9
11
|
|
|
10
|
-
return function(target)
|
|
12
|
+
return function(target: Instance?)
|
|
11
13
|
local maid = Maid.new()
|
|
12
14
|
|
|
13
15
|
local start = Color3.fromRGB(184, 127, 100)
|
|
14
16
|
local finish = Color3.fromRGB(16, 60, 76)
|
|
15
17
|
|
|
16
|
-
for i=0, 100 do
|
|
18
|
+
for i = 0, 100 do
|
|
17
19
|
local frame = Instance.new("Frame")
|
|
18
|
-
frame.BackgroundColor3 = LuvColor3Utils.lerp(start, finish, i/100)
|
|
19
|
-
frame.Size = UDim2.fromScale(1/(100 + 1), 0.5)
|
|
20
|
-
frame.Position = UDim2.fromScale(i/(100 + 1), 0)
|
|
20
|
+
frame.BackgroundColor3 = LuvColor3Utils.lerp(start, finish, i / 100)
|
|
21
|
+
frame.Size = UDim2.fromScale(1 / (100 + 1), 0.5)
|
|
22
|
+
frame.Position = UDim2.fromScale(i / (100 + 1), 0)
|
|
21
23
|
frame.BorderSizePixel = 0
|
|
22
24
|
frame.Parent = target
|
|
23
25
|
maid:GiveTask(frame)
|
|
24
26
|
end
|
|
25
27
|
|
|
26
|
-
for i=0, 100 do
|
|
28
|
+
for i = 0, 100 do
|
|
27
29
|
local frame = Instance.new("Frame")
|
|
28
|
-
frame.BackgroundColor3 = start:Lerp(finish, i/100)
|
|
29
|
-
frame.Size = UDim2.fromScale(1/(100 + 1), 0.5)
|
|
30
|
-
frame.Position = UDim2.fromScale(i/(100 + 1), 0.5)
|
|
30
|
+
frame.BackgroundColor3 = start:Lerp(finish, i / 100)
|
|
31
|
+
frame.Size = UDim2.fromScale(1 / (100 + 1), 0.5)
|
|
32
|
+
frame.Position = UDim2.fromScale(i / (100 + 1), 0.5)
|
|
31
33
|
frame.BorderSizePixel = 0
|
|
32
34
|
frame.Parent = target
|
|
33
35
|
maid:GiveTask(frame)
|
|
@@ -36,4 +38,4 @@ return function(target)
|
|
|
36
38
|
return function()
|
|
37
39
|
maid:DoCleaning()
|
|
38
40
|
end
|
|
39
|
-
end
|
|
41
|
+
end
|
|
@@ -340,12 +340,12 @@ end
|
|
|
340
340
|
LuvUtils.m = {
|
|
341
341
|
{ 3.240969941904521, -1.537383177570093, -0.498610760293 },
|
|
342
342
|
{ -0.96924363628087, 1.87596750150772, 0.041555057407175 },
|
|
343
|
-
{ 0.055630079696993, -0.20397695888897, 1.056971514242878 }
|
|
343
|
+
{ 0.055630079696993, -0.20397695888897, 1.056971514242878 },
|
|
344
344
|
}
|
|
345
345
|
LuvUtils.minv = {
|
|
346
346
|
{ 0.41239079926595, 0.35758433938387, 0.18048078840183 },
|
|
347
347
|
{ 0.21263900587151, 0.71516867876775, 0.072192315360733 },
|
|
348
|
-
{ 0.019330818715591, 0.11919477979462, 0.95053215224966 }
|
|
348
|
+
{ 0.019330818715591, 0.11919477979462, 0.95053215224966 },
|
|
349
349
|
}
|
|
350
350
|
LuvUtils.refY = 1.0
|
|
351
351
|
LuvUtils.refU = 0.19783000664283
|
|
@@ -353,4 +353,4 @@ LuvUtils.refV = 0.46831999493879
|
|
|
353
353
|
LuvUtils.kappa = 903.2962962
|
|
354
354
|
LuvUtils.epsilon = 0.0088564516
|
|
355
355
|
|
|
356
|
-
return LuvUtils
|
|
356
|
+
return LuvUtils
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
--!strict
|
|
1
2
|
--[=[
|
|
2
3
|
@class LuvVectorColor3Utils
|
|
3
4
|
]=]
|
|
@@ -14,14 +15,11 @@ local LuvVectorColor3Utils = {}
|
|
|
14
15
|
@param color3 Color3
|
|
15
16
|
@return Vector3
|
|
16
17
|
]=]
|
|
17
|
-
function LuvVectorColor3Utils.fromColor3(color3)
|
|
18
|
-
local hsl = LuvUtils.rgb_to_hsluv({ color3.
|
|
18
|
+
function LuvVectorColor3Utils.fromColor3(color3: Color3): Vector3
|
|
19
|
+
local hsl = LuvUtils.rgb_to_hsluv({ color3.R, color3.G, color3.B })
|
|
19
20
|
|
|
20
21
|
-- Transform from -100% to 100% into 0 to 1 space
|
|
21
|
-
return Vector3.new(
|
|
22
|
-
hsl[1]/200 + 0.5,
|
|
23
|
-
hsl[2]/200 + 0.5,
|
|
24
|
-
hsl[3]/200 + 0.5)
|
|
22
|
+
return Vector3.new(hsl[1] / 200 + 0.5, hsl[2] / 200 + 0.5, hsl[3] / 200 + 0.5)
|
|
25
23
|
end
|
|
26
24
|
|
|
27
25
|
--[=[
|
|
@@ -29,13 +27,13 @@ end
|
|
|
29
27
|
@param luvV3 Vector3
|
|
30
28
|
@return Color3
|
|
31
29
|
]=]
|
|
32
|
-
function LuvVectorColor3Utils.toColor3(luvV3)
|
|
30
|
+
function LuvVectorColor3Utils.toColor3(luvV3: Vector3): Color3
|
|
33
31
|
-- Transform out of this space
|
|
34
32
|
return Color3.new(unpack(LuvUtils.hsluv_to_rgb({
|
|
35
|
-
(luvV3.
|
|
36
|
-
(luvV3.
|
|
37
|
-
(luvV3.
|
|
38
|
-
))
|
|
33
|
+
(luvV3.X - 0.5) * 200,
|
|
34
|
+
(luvV3.Y - 0.5) * 200,
|
|
35
|
+
(luvV3.Z - 0.5) * 200,
|
|
36
|
+
})))
|
|
39
37
|
end
|
|
40
38
|
|
|
41
|
-
return LuvVectorColor3Utils
|
|
39
|
+
return LuvVectorColor3Utils
|