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