Skip to content

pantoken-root / design/swatches/src / toAse

Funció: toAse() ​

toAse(swatches): Uint8Array

Experimental

Codificar mostres com a bytes ASE. Les mostres no hexadecimal s'omet.

Paràmetres ​

swatches ​

només de lectura Swatch[]

La paleta.

Retorna ​

Uint8Array

El fitxer ASE com a bytes.

Exemple ​

Escriure una paleta Adobe .ase

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

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