rickje139
(rickje139)
April 10, 2022, 11:05pm
#1
I am currently working on a color gradient menu but i need to figure out where to move the box whenever the color is changed via the hex value.
Is there a way to check if a color3 value fits in the UI gradient and what the timestamp would be of that color?
I need to know what the timestamp is of color3.FromRGB(255,146,0) in the UI gradient in this case.
Velliaan
(Milenda Foranzi)
April 10, 2022, 11:07pm
#2
rickje139
(rickje139)
April 10, 2022, 11:10pm
#3
That would get the Color3 value from a timestamp, i need to get the timestamp from a Color3 value instead.
mseab29
(SQSea)
April 10, 2022, 11:11pm
#4
Try listing the times that you’re looking for and I’ll try to help you the best way I can.
rickje139
(rickje139)
April 10, 2022, 11:14pm
#5
I need to move the black bar depending on what color is currently selected once you open the menu.
I would have to get the distance from the currently selected color on the UIgradient.
So for an example:
color3.FromRGB(255,146,0) would return 0.1
color3.FromRGB(255,255,123) would return 0.423
but those keypoints are not listed on the UIgradient.
1 Like
mseab29
(SQSea)
April 10, 2022, 11:17pm
#6
I would try to tamper with the times a little bit if you can.
(UIGradient - Roblox Tutorial - YouTube ) I would watch this and see if it can provide you with the information needed.
mseab29
(SQSea)
April 10, 2022, 11:18pm
#7
Not very experienced with this kind of stuff, I am a little bit of a Newbie when it comes to figuring out stuff like this.
But I do try to help the best way I can with things.
Your gradient just looks like a hue gradient, maybe getting the Hue component of the color and working on percentage would be your key.
For example:
local color = Color3.FromRGB(255,146,0);
local h = Color3.toHSV(color);
bar.Position = UDim2.new(h, 0, bar.Position.Y.Scale, 0);
1 Like