Skip to content

Instantly share code, notes, and snippets.

@Vftdan
Created Aug 9, 2019
Embed
What would you like to do?
Convert pal to gpl palette
#! /usr/bin/env python3
input() #header
input() #version
cnt = int(input()) #number of colors
print("GIMP Palette")
print("Columns: {0}".format(cnt))
print("#")
for i in range(cnt):
print("{0} {1} {2}\tUntitled".format(*(input().split())) + str(i + 1))
@Vftdan
Copy link
Author

Vftdan commented Sep 15, 2019

Usage: pal2gpl.py < file.pal > file.gpl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment