JagexColor

Methods
6
Fields
3

Methods

MethodReturnsDescription
packHSL(number, number, number)numberHue, saturation and luminance packed as the game's 16-bit HSL, a signed 16-bit integer.
unpackHue(number)numberThe hue of a packed HSL.
unpackSaturation(number)numberThe saturation of a packed HSL.
unpackLuminance(number)numberThe luminance of a packed HSL.
formatHSL(number)stringA packed HSL as HHhSsLLl.
rgbToHSL(number, number)numberAn RGB colour as the game's packed HSL, at brightness.

Fields

FieldTypeDescription
HUE_MAXnumberJagexColor.HUE_MAX: 63.
LUMINANCE_MAXnumberJagexColor.LUMINANCE_MAX: 127.
SATURATION_MAXnumberJagexColor.SATURATION_MAX: 7.

Method details

packHSL

packHSL: (number, number, number) -> number

Hue, saturation and luminance packed as the game's 16-bit HSL, a signed 16-bit integer.

unpackHue

unpackHue: (number) -> number

The hue of a packed HSL.

unpackSaturation

unpackSaturation: (number) -> number

The saturation of a packed HSL.

unpackLuminance

unpackLuminance: (number) -> number

The luminance of a packed HSL.

formatHSL

formatHSL: (number) -> string

A packed HSL as HHhSsLLl.

rgbToHSL

rgbToHSL: (number, number) -> number

An RGB colour as the game's packed HSL, at brightness.