Color¶
Color utilities with Material Design's 2014 Color Palette
Library API¶
Color.toRGBString¶
string Color.toRGBString(Color3 Color [, number Alpha])
Returns a string representation of the rgb or rgba value for a given Color.
Color.toHexString¶
string Color.toHexString(Color3 Color [, number Alpha])
Returns a string representation of the hexidecimal Color code for a given Color.
Color.fromHex¶
Color3 Color.fromHex(<number, string> Hex)
Converts a 3-digit or 6-digit hex color to a Color3. Takes in a string of the form: "#FFFFFF" or "#FFF" or a 6-digit hexadecimal number (e.g. 0xFFFFFF)
Color.toHex¶
number Color.toHex(Color3 Color)
Returns the Color in its hexidecimal-number form.
Color.COLOR¶
The Color
table contains all the colors from the 2014 Material Design Color Pallete. These Colors are structured like so:
Cyan = { [50] = rgb(224, 247, 250); [100] = rgb(178, 235, 242); [200] = rgb(128, 222, 234); [300] = rgb(77, 208, 225); [400] = rgb(38, 198, 218); [500] = rgb(0, 188, 212); [600] = rgb(0, 172, 193); [700] = rgb(0, 151, 167); [800] = rgb(0, 131, 143); [900] = rgb(0, 96, 100); Accent = { [100] = rgb(132, 255, 255); [200] = rgb(24, 255, 255); [400] = rgb(0, 229, 255); [700] = rgb(0, 184, 212); }; };
Example
local Color = Resources:LoadLibrary("Color") local Cyan = Color.Cyan[500] local DarkCyan = Color.Cyan[900] local CyanAccent = Color.Cyan.Accent[700]