Garry's Mod Wiki

Garry's Mod Wiki

Description

An AccessorFunc that returns the color cube's current set color.

Returns

1 table
The set color, uses Color.

Example

Creates a color cube, sets the color to cyan, adjusts the saturation and value to 50% each, and prints out the final color.

local color_cube = vgui.Create("DColorCube") color_cube:SetSize(200, 200) color_cube:Center() -- Set color to cyan color_cube:SetColor(Color(0, 255, 255)) -- 50% saturated, 50% valued color_cube:TranslateValues(0.5, 0.5) -- Print set color PrintTable(color_cube:GetRGB())
Output:
r = 63 b = 127 a = 255 g = 127

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 twice a day. Edits and history are not available.

Last Parsed: Loading...