pantoken / design/swatches/src / toGpl
Függvény: toGpl()
toGpl(
swatches,options?):string
Kísérleti
Kódolja a mintákat egy GIMP .gpl paletta karakterláncként.
Paraméterek
swatches
csak olvasható Swatch[]
A paletta.
options?
ToGplOptions = {}
Visszatérés
string
Példák
Írjon egy GIMP .gpl palettát
ts
import { writeFileSync } from "node:fs";
import { swatches, toGpl } from "@pantoken/swatches";
writeFileSync("instructure.gpl", toGpl(swatches));Egyéni palettanévvel
ts
import { swatches, toGpl } from "@pantoken/swatches";
const gpl = toGpl(swatches, { name: "Instructure Rebrand" });