Skip to content

pantoken / design/swatches/src / toGpl

फंक्शन: toGpl()

toGpl(swatches, options?): string

प्रयोगात्मक

स्वैच को GIMP .gpl पैलेट स्ट्रिंग के रूप में एन्कोड करें.

पैरामीटर

swatches

readonly Swatch[]

पैलेट।

options?

ToGplOptions = {}

ToGplOptions.

वापसी

string

उदाहरण

GIMP .gpl पैलेट लिखें

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

writeFileSync("instructure.gpl", toGpl(swatches));

कस्टम पैलेट नाम के साथ

ts
import { swatches, toGpl } from "@pantoken/swatches";

const gpl = toGpl(swatches, { name: "Instructure Rebrand" });