Skip to content

pantoken-root / design/swatches/src / toGpl

Funksjon: toGpl() ​

toGpl(swatches, options?): string

Eksperimentell

Koder fargeprøver som en GIMP .gpl palettstreng.

Parametere ​

swatches ​

skrivbeskyttet Swatch[]

Paletten.

options? ​

ToGplOptions = {}

ToGplOptions.

Returnerer ​

string

Eksempler ​

Skriv en GIMP .gpl-palett

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

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

Med et egendefinert palettnavn

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

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