Skip to content

pantoken-root / design/swatches/src / toGpl

Funktion: toGpl() ​

toGpl(swatches, options?): string

Experimentell

Koda färgprover som en GIMP .gpl palettsträng.

Parametrar ​

swatches ​

skrivskyddad Swatch[]

Paletten.

options? ​

ToGplOptions = {}

ToGplOptions.

Returnerar ​

string

Exempel ​

Skriv en GIMP .gpl-palett

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

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

Med ett anpassat palettnamn

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

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