Skip to content

pantoken-root / design/swatches/src / toAse

Ֆունկցիա: toAse() ​

toAse(swatches): Uint8Array

Փորձարկումային

Գույնանմուշները կոդավորել ASE բայթերի տեսքով. Չհեքսային գույնանմուշները բաց են թողնվում.

Պարամետրեր ​

swatches ​

միայն կարդացվող Swatch[]

Պալիտրա.

Վերադարձվող արժեք ​

Uint8Array

ASE ֆայլը՝ բայթերի տեսքով.

Օրինակ ​

Գրել Adobe .ase պալիտրա

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

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