Color Lua API: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 18: | Line 18: | ||
'''Notes''': Defaults to full alpha, optionally pass in required alpha | '''Notes''': Defaults to full alpha, optionally pass in required alpha | ||
=== LessRandomColor === | |||
<syntaxhighlight source lang="lua">Color.LessRandomColor(hMin, hMax, sMin, sMax, vMin, vMax, aMin, aMax)</syntaxhighlight> | |||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| hMin || number | |||
|- | |||
| hMax || number | |||
|- | |||
| sMin || number | |||
|- | |||
| sMax || number | |||
|- | |||
| vMin || number | |||
|- | |||
| vMax || number | |||
|- | |||
| aMin || number | |||
|- | |||
| aMax || number | |||
|} | |||
'''Description''': Returns a random color based on hue, saturation, value, and alpha upper and lower limits | |||
'''Returns''': Lua Table | |||
== Variables == | |||
== Variables == | == Variables == | ||
=== Clear === | === Clear === | ||
Line 163: | Line 191: | ||
This file is auto generated, please don't edit manually! | This file is auto generated, please don't edit manually! | ||
'''Docs last hacked together on''': | '''Docs last hacked together on''': 29/08/2023 16:24 | ||
[[Category:Modding]][[Category:LuaAPI]] | [[Category:Modding]][[Category:LuaAPI]] |
Latest revision as of 14:04, 29 August 2023
Color
Description
Allows quick access to colours matching the Off Grid colour pallette
Functions
RandomColor
Color.RandomColor(alpha)
Expected parameter types
Name | Type |
---|---|
alpha | number (optional) |
Description: Returns a random color
Returns: Lua Table
Notes: Defaults to full alpha, optionally pass in required alpha
LessRandomColor
Color.LessRandomColor(hMin, hMax, sMin, sMax, vMin, vMax, aMin, aMax)
Expected parameter types
Name | Type |
---|---|
hMin | number |
hMax | number |
sMin | number |
sMax | number |
vMin | number |
vMax | number |
aMin | number |
aMax | number |
Description: Returns a random color based on hue, saturation, value, and alpha upper and lower limits
Returns: Lua Table
Variables
Variables
Clear
Color.Clear
Description:
Preview | RGB |
---|---|
1, 1, 1 |
Black
Color.Black
Description:
Preview | RGB |
---|---|
0.094, 0.094, 0.094 |
DarkGrey
Color.DarkGrey
Description:
Preview | RGB |
---|---|
0.345, 0.345, 0.345 |
Grey
Color.Grey
Description:
Preview | RGB |
---|---|
0.722, 0.722, 0.722 |
LightGrey
Color.LightGrey
Description:
Preview | RGB |
---|---|
0.847, 0.847, 0.847 |
White
Color.White
Description:
Preview | RGB |
---|---|
0.972, 0.972, 0.972 |
Red
Color.Red
Description:
Preview | RGB |
---|---|
0.671, 0.275, 0.259 |
Orange
Color.Orange
Description:
Preview | RGB |
---|---|
0.863, 0.589, 0.336 |
Yellow
Color.Yellow
Description:
Preview | RGB |
---|---|
0.969, 0.792, 0.533 |
Green
Color.Green
Description:
Preview | RGB |
---|---|
0.631, 0.71, 0.424 |
Cyan
Color.Cyan
Description:
Preview | RGB |
---|---|
0.525, 0.757, 0.725 |
Blue
Color.Blue
Description:
Preview | RGB |
---|---|
0.486, 0.686, 0.761 |
Purple
Color.Purple
Description:
Preview | RGB |
---|---|
0.729, 0.545, 0.686 |
Brown
Color.Brown
Description:
Preview | RGB |
---|---|
0.631, 0.412, 0.275 |
This file is auto generated, please don't edit manually!
Docs last hacked together on: 29/08/2023 16:24