Skip to content

pantoken / design/swatches/src / toGpl

دالة: toGpl()

toGpl(swatches, options?): string

تجريبي

تشفير عَيّنات الألوان كسلسلة لوحة GIMP .gpl.

المعلمات

swatches

للقراءة فقط Swatch[]

لوحة الألوان.

options?

ToGplOptions = {}

ToGplOptions.

القيم المرجعة

string

أمثلة

اكتب لوحة GIMP .gpl

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

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

مع اسم مخصص للوحة

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

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