How do I change the imagecolor3 value of an image label

I’m trying to make the image label darken slightly whenever the user is hovering over the label. My current attempt prints successfully whenever I hover over and stop hovering over the label, but the color doesn’t change.

script.Parent.MouseEnter:Connect(function()
	script.Parent.ImageColor3 = Color3.new(155,155,155)
end)

script.Parent.MouseLeave:Connect(function()
	script.Parent.ImageColor3 = Color3.new(255,255,255)
end)

What am I doing wrong here for the color not to change?

You’re using Color3.new, when you should be using Color3.fromRGB instead

  • Color3.new can only go up to 1, after that you’re pretty much dead light-wise

  • Color3.fromRGB can only up to 255, which can result in much better colors (Even if you were to add (255, 255, 255) to that, you’d still have a nice white color

Do look at this API Reference as well:

2 Likes

Ah, I see. I had read Color3.new from the API over imagecolor 3 so I got a bit confused, thanks. Will have to bookmark this for further reference.

1 Like