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