Docs

Colours

The Colours keyword gives you access to one function (withAlpha ) and a list of named Colours that can be used in a Panels g context.

Class methods

fromVec4

Converts a colour from a [r, g, b, a] float array to a uint32 value.

Colours.fromVec4(var vec4)



toVec4

Converts a colour to a [r, g, b, a] array that can be passed to GLSL as vec4.

Colours.toVec4(int colour)



withAlpha

Returns a colour value with the specified alpha value.

Colours.withAlpha(int colour, float alpha)



withBrightness

Returns a colour with the specified brightness.

Colours.withBrightness(int colour, float brightness)



withHue

Returns a colour with the specified hue.

Colours.withHue(int colour, float hue)



withMultipliedAlpha

Returns a colour with a multiplied alpha value.

Colours.withMultipliedAlpha(int colour, float factor)



withMultipliedBrightness

Returns a colour with a multiplied brightness value.

Colours.withMultipliedBrightness(int colour, float factor)



withMultipliedSaturation

Returns a colour with a multiplied saturation value.

Colours.withMultipliedSaturation(int colour, float factor)



withSaturation

Returns a colour with the specified saturation.

Colours.withSaturation(int colour, float saturation)