Skip to content

pantoken / design/swatches/src / toGpl

Fungsi: toGpl()

toGpl(swatches, options?): string

Eksperimental

Enkod sampel warna sebagai rentetan 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 tersuai

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

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