Skip to content

pantoken-root / 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" });