Skip to content

pantoken-root / design/swatches/src / toGpl

Fonksiyon: toGpl() ​

toGpl(swatches, options?): string

Deneysel

Renk örneklerini GIMP .gpl palet dizesi olarak kodla.

Parametreler ​

swatches ​

salt okunur Swatch[]

Palet.

options? ​

ToGplOptions = {}

ToGplOptions.

Döndürür ​

string

Örnekler ​

GIMP .gpl paleti oluştur

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

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

Özel bir palet adıyla

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

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