Palette
Easy color picker that uses the Material color system
Available colors:
- red
- orange
- yellow
- gold
- green
- blue
- purple
- blue-gray
- gray
Available shades:
- 50
- 100
- 200
- 300
- 400
- 500 (default)
- 600
- 700
- 800
- 900
Install with wally by adding the following to your wally.toml
:
Palette = "dig1t/palette@1.0.1"
Functions
get
Palette.
get
(
color:
string
,
--
The color to use
shade:
number?
--
The shade to use. Defaults to 500.
) →
Color3
Creates a Color3 object from the given color and shade.
Example:
local button: TextButton = Instance.new("TextButton")
local btnColor: Color3 = Palette("blue", 500)
local btnHover: Color3 = Palette("blue", 300)
button.BackgroundColor3 = btnColor
button.MouseEnter:Connect(function()
btn.BackgroundColor3 = btnHover
end)
button.MouseLeave:Connect(function()
btn.BackgroundColor3 = btnColor
end)