Skip to content

pantoken-root / design/swatches/src / toGpl

Functie: toGpl() ​

toGpl(swatches, options?): string

Experimenteel

Codeer kleurstalen als een GIMP .gpl paletstring.

Parameters ​

swatches ​

alleen-lezen Swatch[]

Het palet.

options? ​

ToGplOptions = {}

ToGplOptions.

Retourneert ​

string

Voorbeelden ​

Schrijf een GIMP .gpl-palet

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

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

Met een aangepaste paletnaam

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

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