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