Skip to content

pantoken-root / design/swatches/src / toGpl

Fungsi: toGpl() ​

toGpl(swatches, options?): string

Eksperimental

Mengkodekan sampel warna sebagai string palet GIMP .gpl.

Parameter ​

swatches ​

hanya-baca Swatch[]

Palet.

options? ​

ToGplOptions = {}

ToGplOptions.

Mengembalikan ​

string

Contoh ​

Tulis palet GIMP .gpl

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

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

Dengan nama palet kustom

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

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