What are these "player colors" called and is there a function to get a players color?

On Roblox, if you remove all your clothing from your avatar, your avatar will receive 2 default Roblox clothing. Though the clothing that you receive is always the same one and has a specific color.

As example, if you try to apply a HumanoidDescription with an invalid ID, it will give you this Shirt Roblox Purple Shirt - Roblox and these Pants Roblox Purple Shorts - Roblox and it will only give you that one.

 

Now, my question is, what are these colors? Why some accounts get specific shirt colors? I also noticed that in the default chat, your name will be in the same color, as the shirt you will receive.

And how can you retrieve these colors from a player?

The username’s chat color doesn’t always match the color of the default clothing fallbacks, in your case that was likely a coincedence.

Purple default clothing is always applied when setting invalid asset IDs for the player’s character’s shirt/pants/t-shirt.

local players = game:GetService("Players")
local run = game:GetService("RunService")

players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		if not player:HasAppearanceLoaded() then
			player.CharacterAppearanceLoaded:Wait()
		end
		
		run.Stepped:Wait()
		local humanoid = character:WaitForChild("Humanoid")
		local description = humanoid:GetAppliedDescription()
		description.Shirt = 1
		description.Pants = 2
		description.GraphicTShirt = 3
		for _, bodyPartEnum in ipairs(Enum.BodyPart:GetEnumItems()) do
			description[bodyPartEnum.Name.."Color"] = Color3.new(0, 0, 0)
		end
		humanoid:ApplyDescription(description)
	end)
end)

I don’t know. On Studio it always gives me that color.