import type { Canvas } from 'skia-canvas';
export type CanvasAndContext = {
    canvas: HTMLCanvasElement;
    context: CanvasRenderingContext2D;
};
/**
 * Convert a canvas to a buffer.
 * @param canvas The canvas to convert.
 * @returns A promise that resolves to the buffer.
 */
export declare function canvasToData(canvas: HTMLCanvasElement | Canvas): Promise<Uint8Array<ArrayBuffer>>;
/**
 * Convert a buffer to a data url.
 * @param data The buffer to convert.
 * @param type The type of the data url. Defaults to 'image/png'.
 * @returns A promise that resolves to the data url.
 */
export declare function toDataUrl(data: Uint8Array<ArrayBuffer>, type?: string): Promise<string>;
/**
 * Convert hash color to RGB array.
 * @param color The color in hex format (e.g., '#ff0000' or '#f00').
 * @returns An array of RGB values [r, g, b].
 */
export declare function colorToRgb(color: string): [number, number, number];
export declare function rgbToHex(rgb: [number, number, number]): string;
export declare function rgbToHex(r: number, g: number, b: number): string;
export declare function parseRgbaColor(color: string): {
    r: number;
    g: number;
    b: number;
    a: number;
};
export declare function randomUUID(): string;
export declare const OPS_DICT: {
    [k: string]: string;
};
