Garry's Mod Wiki

Revision Difference

Color#517255

<cat>classfunc</cat> 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>. 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>⤶ <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>⤶ ⤶ ⤶ | Type | Name | Description |⤶ | ------------------- | ----- | --------------------------------- |⤶ | <page>number</page> | **r** | The red component of the color. |⤶ | <page>number</page> | **g** | The green component of the color. |⤶ | <page>number</page> | **b** | The blue component of the color. |⤶ | <page>number</page> | **a** | The alpha component of the color. |⤶