Skip to content

pantoken-root / design/swatches/src / toGpl

Funktion: toGpl() ​

toGpl(swatches, options?): string

Eksperimentel

Kodér prøver som en GIMP .gpl-paletstring.

Parametre ​

swatches ​

skrivbeskyttet Swatch[]

Paletten.

options? ​

ToGplOptions = {}

ToGplOptions.

Returnerer ​

string

Eksempler ​

Skriv en GIMP .gpl-palet

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

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

Med et brugerdefineret palet navn

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

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