Cauldron2D.GameMaker.Colour (Cauldron2D.GameMaker v0.2.1)

Copy Markdown View Source

GameMaker's colour functions, as {r, g, b}.

Colour.hsv(25, 220, 200)
Colour.merge({255, 0, 0}, {0, 0, 255}, 0.5)

hsv/3 is make_color_hsv: hue, saturation and value each 0..255, the hue wrapping around the colour wheel. merge/3 is merge_color: amount 0.0 gives the first colour, 1.0 the second.

Summary

Functions

The colour of hue hue, saturation saturation and value value, each 0..255.

The colour amount of the way from from to to.

Types

t()

@type t() :: {byte(), byte(), byte()}

Functions

hsv(hue, saturation, value)

@spec hsv(number(), number(), number()) :: t()

The colour of hue hue, saturation saturation and value value, each 0..255.

merge(arg1, arg2, amount)

@spec merge(t(), t(), number()) :: t()

The colour amount of the way from from to to.