Garry's Mod Wiki

Vector:ToColor

  table Vector:ToColor()

Description

Translates the Vector (values ranging from 0 to 1) into a Color. This will also range the values from 0 - 1 to 0 - 255.

x * 255 -> r
y * 255 -> g
z * 255 -> b

This is the opposite of Color:ToVector

Returns

1 table
The created Color.

Example

Get the Player1's player model color but in RGB

Output: Prints the player color of Player1 in RGB instead of a Vector