Garry's Mod Wiki

Revision Difference

Color#517128

List of all possible functions to manipulate colors. Colors are implemented in Lua thus <page>Global.type</page>(color) == "table" and <page>Global.TypeID</page>(color) == TYPE_TABLE. For type checking use <page>Global.IsColor</page>. Created by <page>Global.Color</page>, <page>Global.HSVToColor</page>, and <page>Global.HSLToColor</page>. <classfields> <fields>{{ClassField|number|r|The red component of the color.</fields>⤶ <fields>⤶ <item name="r" type="number">The red component of the color.</item>⤶ ⤶ <item name="g" type="number">The green component of the color.</item>⤶ ⤶ <item name="b" type="number">The blue component of the color.</item>⤶ ⤶ <item name="a" type="number">The alpha component of the color.</item>⤶ </fields>⤶ </classfields> ⤶ ⤶ {{ClassField|number|g|The green component of the color.}}⤶ {{ClassField|number|b|The blue component of the color.}}⤶ {{ClassField|number|a|The alpha component of the color.}}⤶ }}