Difference between revisions of "Color Lua API"

From Off Grid Wiki
Jump to navigation Jump to search
(removing docStart tag)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
<!-- This file is auto generated, please don't edit manually! -->
 
= Color =
 
= Color =
 
== Description ==
 
== Description ==
Line 7: Line 8:
 
'''Expected parameter types'''
 
'''Expected parameter types'''
 
{| class="wikitable"
 
{| class="wikitable"
 +
|-
 +
! Name !! Type
 
|-
 
|-
 
| alpha || number (optional)
 
| alpha || number (optional)
Line 15: 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 158: Line 189:
  
  
'''Docs last hacked together on''': 09/05/2017 12:46
+
This file is auto generated, please don't edit manually!
 +
 
 +
'''Docs last hacked together on''': 13/10/2021 15:55
 +
[[Category:Modding]][[Category:LuaAPI]]

Latest revision as of 09:04, 14 October 2021

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: 13/10/2021 15:55