Skip to content

pantoken / design/swatches/src / toAse

Hàm: toAse()

toAse(swatches): Uint8Array

Thử nghiệm

Mã hoá mẫu màu thành byte ASE. Các mẫu không phải hex sẽ bị bỏ qua.

Tham số

swatches

chỉ đọc Swatch[]

Bảng màu.

Trả về

Uint8Array

Tệp ASE dưới dạng byte.

Ví dụ

Ghi bảng màu Adobe .ase

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

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