Files
armorpaint/base/Sources/ExportGpl.ts
T
luboslenco 156f3eb274 Refactor
2024-02-10 19:26:53 +01:00

18 lines
450 B
TypeScript

class ExportGpl {
static run = (path: string, name: string, swatches: TSwatchColor[]) => {
let o = "";
o += "GIMP Palette\n";
o += "Name: " + name + "\n";
o += "# armorpaint.org\n";
o += "#\n";
for (let swatch of swatches) {
o += String(color_get_rb(swatch.base)) + " " + String(color_get_gb(swatch.base)) + " " + String(color_get_bb(swatch.base)) + "\n";
}
krom_file_save_bytes(path, sys_string_to_buffer(o), o.length);
}
}