Can you make a radial UIGradient?

Hi,

I’m wondering if I can make a UIGradient that is radial instead of one that is linear? I’m trying to make a colour wheel which involves saturation and brightness, however with my current approach, which is using an image label, you can only display brightness and not saturation.

Ideally, it would look something like this, which is my current colour wheel which uses a single image label.
image

Also, the portion that will be displayed to the user will probably be like 10 pixels thick, final version would look something like this:
image

Thanks in advance for any help!

So I was able to make something that sorta achieves this, it’s made entirely of frames but I doubt it’s very performant (91 frames!) and it’s a bit choppy but I suppose it does the trick for the time being.
image

Here’s the code smell that generated it, select a frame and it should do the trick, also replace 100 with the diameter of the circle:

Also uses terrible practices like not using :GetService, no checks etc but it’s something supposed to be ran in the command bar so it doesn’t really matter.

for i = 0,360,4 do 
    local c = game.Selection:Get()[1]:Clone() 
    c.Parent = game.Selection:Get()[1].Parent 
    c.Position = UDim2.fromOffset(math.cos(math.rad(i)) * 100, math.sin(math.rad(i)) * 100) 
    c.Rotation = i-90 c.BackgroundColor3 = Color3.fromHSV(i/360,1,1) 
end

I’ll mark this as solution for now but if anyone has any better ideas that (a) use less frames and/or (b) look better (it looks very rough).

3 Likes

Firstly, you over-estimate how much performance frames use. Look at the spray painting games on Roblox, which entirely rely on image-labels put on surfaces. Having a few 2d frames won’t make a difference.

Secondly, Roblox is really behind in terms of UI in engine.