Methods

mix (c1:Color, c2:Color, strength:Float):Color

Static methods

staticaverage (image:Bitmap, ?region:Rectangle, ?alpha:Int):Color

Computes the average RGB color of the pixels in the image.

Parameters:

image

The image whose average color will be calculated.

alpha

The opacity of the image (0-255), defaults to opaque (255).

Returns:

The average RGB color of the image, RGBA8888 format. Alpha defaults to opaque (255).

staticinlineblendColors (c1:Color, c2:Color, ?blend:ColorBlend):Color

Applies a linear transformation (a * value + c) on each channel (red, green, blue, alpha) .

staticinlinecolorEquals (a:Color, b:Color):Bool

staticinlinefilter (c:Color, o:ColorFilter):Color

Supports filter declarations by providing a function fn that transform colors to colors, or if not given, alternatively it supports providing 1-grade equation coeficients to transform each channel linearly (red*a+c).

staticinlinerandom (?alpha:Int):Color

staticinlinerandomGray (?alpha:Int):Color