Skip to content

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