Files
armorpaint/base/Sources/export_gpl.ts
T

15 lines
456 B
TypeScript
Raw Normal View History

2024-03-13 23:50:11 +01:00
function export_gpl_run(path: string, name: string, swatches: swatch_color_t[]) {
let o: string = "";
o += "GIMP Palette\n";
o += "Name: " + name + "\n";
o += "# armorpaint.org\n";
o += "#\n";
for (let swatch of swatches) {
2024-03-20 16:13:54 +01:00
o += any_to_string(color_get_rb(swatch.base)) + " " + any_to_string(color_get_gb(swatch.base)) + " " + any_to_string(color_get_bb(swatch.base)) + "\n";
2024-03-13 23:50:11 +01:00
}
krom_file_save_bytes(path, sys_string_to_buffer(o), o.length);
}