Hi guys!
I’m working on a UI project right now and trying my hand at scripting it myself. An element of the UI is supposed to show up as the same color as the player’s team color. I noticed that there’s Color3.fromRBG()
and Color3.fromHSV()
, but no Color3.fromBrickColor()
.
Currently, I’m working with this as a potential fix. (in concept, it doesn’t work)
ui.Frame.Rank
is the TextLabel that needs the text to be colored.
local part = Instance.new("Part")
part.Parent = game:GetService("ServerStorage")
part.BrickColor = plr.TeamColor
ui.Frame.Rank.TextColor3 = Color3.fromRGB(part.Color)
part:Destroy()
I know (or think I know) that parts present an RGB value when extracted from the Color property, so I attempted to use that to get the Color3 for the text’s color.
Any help is greatly appreciated and I’m able to clarify anything that isn’t clear in this post. I haven’t often worked with UI Color properties through scripts before.