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