FixImage Documentation
Back to summary
import "image/image";
Global functions
RGB color conversion
function rgb(value: Integer): Integer
-
Returns the color with opaque alpha.
function argb(value: Integer): Integer
-
Returns the color in the premultiplied format.
HSV color representation
function hsv_to_rgb(hue: Float, saturation: Float, value: Float): Integer
-
Converts color from HSV representation to RGB (with opaque alpha). The hue is in the range 0 to 360
and saturation and value in 0 to 1.
function rgb_to_hsv(rgb: Integer): Float[]
function rgb_to_hsv(rgb: Integer, out: Float[]): Float[]
-
Converts color from RGB representation to HSV, optionally you can provide a buffer to store
the values into.
HSL color representation
function hsl_to_rgb(hue: Float, saturation: Float, lightness: Float): Integer
-
Converts color from HSL representation to RGB (with opaque alpha). The hue is in the range 0-360
and saturation and lightness in 0 to 1.
function rgb_to_hsl(rgb: Integer): Float[]
function rgb_to_hsl(rgb: Integer, out: Float[]): Float[]
-
Converts color from RGB representation to HSL, optionally you can provide a buffer to store
the values into.