-
Notifications
You must be signed in to change notification settings - Fork 7
Gimp palette format extensions
Gimp palette format (.gpl) is pretty simple, but it can be easily extended without losing compatibility. Syntax of .gpl file defines, that any line starting with # sign should be considered as comment and ignored. Palette_editor uses comments to store metainformation in .gpl files.
After standard .gpl file header, palette_editor puts fixed line:
# Colors not marked with #USER are auto-generated
When reading .gpl file, palette_editor checks for this line to detect that file was written by palette_editor.
After marker, palette_editor puts metainformation attributes of palette in "# Name: Value" format:
# URL: http://paletton.com/#uid=1000u0kllllaFw0g0qFqFg0w0aF
# Name: 5 reds
In palette_editor's palette, each color slot can be either user-defined or automatically generated. To indicate, which slots were defined by user, palette_editor puts "# USER" comment at end of line with color:
170 57 57 Untitled #USER
All colors without this mark are considered as automatically generated.
After each line with color, palette_editor puts color metainformation in "# Name: Value" format:
180 39 39 Reddish #USER
# Author: Ilya Portnov