Garry's Mod Wiki

Garry's Mod Wiki

  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

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...