Skip to content

pantoken-root / design/swatches/src / toSketchPalette

Swyddogaeth: toSketchPalette() ​

toSketchPalette(swatches): SketchPalette

Arbrofol

Codwch samplau lliw fel gwrthrych palet Sketch (serialeiddio gyda JSON.stringify).

Paramedrau ​

swatches ​

darllen yn unig Swatch[]

Y palet.

Yn dychwelyd ​

SketchPalette

Enghraifft ​

Ysgrifennwch ffeil .sketchpalette ar gyfer Sketch

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

writeFileSync("instructure.sketchpalette", JSON.stringify(toSketchPalette(swatches)));