Skip to content

pantoken / design/swatches/src / toGpl

Funzione: toGpl()

toGpl(swatches, options?): string

Sperimentale

Codifica i campioni come una stringa di palette GIMP .gpl.

Parametri

swatches

readonly Swatch[]

La tavolozza.

options?

ToGplOptions = {}

ToGplOptions.

Restituisce

string

Esempi

Scrivi una palette GIMP .gpl

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

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

Con un nome di palette personalizzato

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

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