Skip to content

pantoken-root / design/swatches/src / toGpl

دالة: toGpl() ​

toGpl(swatches, options?): string

Experimental

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

Parameters ​

swatches ​

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

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

options? ​

ToGplOptions = {}

ToGplOptions.

Returns ​

string

Examples ​

اكتب لوحة 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" });