Garry's Mod Wiki

Player:GetPlayerColor

  Vector Player:GetPlayerColor()

Description

Returns a player's character model color.

The part of the model that is colored is determined by the model's materials, and is therefore different for each model.

See Player:GetWeaponColor for the accompanying function for the weapon color.

Override this function clientside on any Entity (including a player) with a supported model set (such as default player models) and returned color will apply to the model. This is done via the PlayerColor matproxy.

Returns

1 Vector
The format is Vector(r,g,b), and each color component should be between 0 and 1.

Example

Gets player 1's model color, and prints it to console

Output:
Vector( 1, 1, 1 )