ColorMatrixBuilder

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun addConstant(color: ColorRGBa, ignoreAlpha: Boolean = true)

Adds a constant color transformation to the current color matrix.

Link copied to clipboard
fun build(): Matrix55
Link copied to clipboard
fun grayscale(r: Double = 1.0/3.0, g: Double = 1.0/3.0, b: Double = 1.0/3.0)

Applies a grayscale transformation to the current color matrix using the specified red, green, and blue coefficients.

Link copied to clipboard
fun invert(invertR: Boolean = true, invertG: Boolean = true, invertB: Boolean = true)

Inverts the specified color channels in the current color matrix.

Link copied to clipboard
fun multiply(matrix: Matrix55)

Multiplies the current transformation matrix with the specified 5x5 matrix.

Link copied to clipboard
fun tint(color: ColorRGBa)

Applies a tint transformation to the color matrix using the specified color.