Skip to content

pantoken / design/swatches/src / toGpl

Funkcija: toGpl()

toGpl(swatches, options?): string

Eksperimentalno

Kodiraj vzorce barv kot GIMP .gpl niz palete.

Parametri

swatches

readonly Swatch[]

Paleta.

options?

ToGplOptions = {}

ToGplOptions.

Vrne

string

Primeri

Zapiši GIMP .gpl paleto

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

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

Z lastnim imenom palete

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

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