Skip to content

pantoken / design/swatches/src / toGpl

Funksjon: toGpl()

toGpl(swatches, options?): string

Eksperimentell

Kodar fargeprøver som ein GIMP .gpl palett-streng.

Parametrar

swatches

skrivebeskytta Swatch[]

Paletten.

options?

ToGplOptions = {}

ToGplOptions.

Returnerer

string

Døme

Skriv ein GIMP .gpl-palett

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

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

Med eit eige palettnamn

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

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