Skip to content

pantoken-root / design/swatches/src / toGpl

Funkcija: toGpl() ​

toGpl(swatches, options?): string

Eksperimentalno

Kodiraj vzorce barv kot GIMP .gpl niz palete.

Parametri ​

swatches ​

samo za branje 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" });