Skip to content

pantoken-root / design/swatches/src / toAse

関数: toAse() ​

toAse(swatches): Uint8Array

実験的

スウォッチを ASE バイトとしてエンコードします。16進以外のスウォッチはスキップされます。

パラメーター ​

swatches ​

読み取り専用 Swatch[]

パレット。

戻り値 ​

Uint8Array

ASE ファイルをバイト列として。

例 ​

Adobe の .ase パレットを書き出す

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

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