Skip to content

pantoken / design/swatches/src / toAse

Function: toAse()

toAse(swatches): Uint8Array

Experimental

Encode swatches as ASE bytes. Non-hex swatches are skipped.

Parameters

swatches

readonly Swatch[]

The palette.

Returns

Uint8Array

The ASE file as bytes.

Example

Write an Adobe .ase palette

ts
import { writeFileSync } from "node:fs";
import { swatches, toAse } from "@pantoken/swatches";

writeFileSync("instructure.ase", toAse(swatches));