Colours
red.jackf.jackfredlib.api.colour.Colour
Colour
s are literally that - objects that represent a single colour. They contain methods to convert two and from RGBA and HSV values, lerp between two colours, and obtain the Minecraft DyeColour
that is closest to it. Some notable methods are below
fromRGB()
fromRGB()
Creates a colour object from a given red, green and blue value. There is also a fromARGB()
method that takes an alpha channel.
fromHSV()
fromHSV()
Creates a colour object from a given hue, saturation and value. There is also a fromAHSV()
method that takes an alpha channel.
For more information, see the Wikipedia page on HSV.
fromInt()
fromInt()
Creates a colour object from a packed integer in ARGB format.
lerp()
lerp()
Blends this colour towards another by a specified factor. Uses linear interpolation, not HSV.
closestDyeColour()
closestDyeColour()
Returns the closest Minecraft DyeColour
to this colour. Currently uses the closest by Manhattan distance in the 3D colour space, though this may change in the future.
Last updated