Home Commands Examples Getting Started With Scripts Global Keywords
Generic JSON Recipes

Color

Importing the class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

script.zs
import contenttweaker.util.Color;

Static Methods

Return Type: Color

script.zs
Color.packedRgb(color as int) as Color
ParameterType
Parameter
color
Type
int

Return Type: Color

script.zs
Color.packedRgba(color as int) as Color
ParameterType
Parameter
color
Type
int

Return Type: Color

script.zs
Color.rgb(r as int, g as int, b as int) as Color
ParameterType
Parameter
r
Type
int
Parameter
g
Type
int
Parameter
b
Type
int

Return Type: Color

script.zs
Color.rgba(r as int, g as int, b as int, a as int) as Color
ParameterType
Parameter
r
Type
int
Parameter
g
Type
int
Parameter
b
Type
int
Parameter
a
Type
int

Properties

NameTypeHas GetterHas Setter
Name
a
Type
int
Has Getter
true
Has Setter
false
Name
b
Type
int
Has Getter
true
Has Setter
false
Name
g
Type
int
Has Getter
true
Has Setter
false
Name
r
Type
int
Has Getter
true
Has Setter
false