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));