How to get Color3 from a Team Color

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.

3 Likes

Color3 = TeamColor.Color

I USUALLY don’t complain about people making posts but this was a very easy find on google search

7 Likes

Apologies. I had searched it and came up with nothing relevant to my situation that I could try within my application, which is why I turned here. TeamColor.Color is helpful.

Thank you!

3 Likes