Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
interface ColorMatrixHelpers
import { type ColorMatrixHelpers } from "https://deno.land/x/canvaseno@v1.0.2/mod.ts";

Methods

concat(outer: SkColorMatrix, inner: SkColorMatrix): SkColorMatrix

Returns a new SkColorMatrix that is the result of multiplying outer*inner

identity(): SkColorMatrix

Returns an identity SkColorMatrix.

postTranslate(
dr: number,
dg: number,
db: number,
da: number,
): SkColorMatrix

Sets the 4 "special" params that will translate the colors after they are multiplied by the 4x4 matrix.

rotated(
axis: number,
sine: number,
cosine: number,
): SkColorMatrix

Returns a new SkColorMatrix that is rotated around a given axis.

scaled(
redScale: number,
greenScale: number,
blueScale: number,
alphaScale: number,
): SkColorMatrix

Returns a new SkColorMatrix that scales the colors as specified.