Skip to content

pantoken / design/swatches/src / toGpl

Funktio: toGpl()

toGpl(swatches, options?): string

Kokeellinen

Koodaa näytteet GIMP .gpl -palettimerkkijonoksi.

Parametrit

swatches

vain-luku Swatch[]

Paletti.

options?

ToGplOptions = {}

ToGplOptions.

Palauttaa

string

Esimerkit

Kirjoita GIMP .gpl -paletti

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

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

Mukautetulla palettinimellä

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

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