Garry's Mod Wiki

string.ToColor

  table string.ToColor( string Inputstring )

Description

Fetches a Color type from a string.

Arguments

1 string Inputstring
The string to convert from.

Returns

1 table
The output Color

Example

Demonstrates the use of string.ToColor

PrintTable( string.ToColor( "255 0 255 125" ) )
Output:
r = 255 g = 0 b = 255 a = 125