Skip to content

pantoken / design/swatches/src / toGpl

Funkcja: toGpl()

toGpl(swatches, options?): string

Eksperymentalne

Zakoduj próbki kolorów jako ciąg palety GIMP .gpl.

Parametry

swatches

tylko do odczytu Swatch[]

Paleta.

options?

ToGplOptions = {}

ToGplOptions.

Zwraca

string

Przykłady

Zapisz paletę GIMP .gpl

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

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

Z niestandardową nazwą palety

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

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