GPL Palette Imports Incorrectly With Extra Spaces

Hello,

When a GPL file has extra spaces between numbers, colors are not loaded from a palette correctly. As an example, here is a selection from the Pico 8 extended palette from PICO-8 Secret Palette Palette that has been reformatted.

GIMP Palette
Name: Pico 8 Extended
Columns: 0
# URL: https://lospec.com/palette-list/pico-8-secret-palette
# Colors: 32
  0   0   0 000000
 29  43  83 1D2B53
126  37  83 7E2553
  0 135  81 008751
171  82  54 AB5236
 95  87  79 5F574F

This is how it appears in Pro Motion version 8.0.10:

proMotionWrongResult

Leading zeroes do not seem to cause a problem:

GIMP Palette
Name: Pico 8 Extended
Columns: 0
# URL: https://lospec.com/palette-list/pico-8-secret-palette
# Colors: 32
000 000 000 000000
029 043 083 1D2B53
126 037 083 7E2553
000 135 081 008751
171 082 054 AB5236
095 087 079 5F574F

The original file from Lospec uses tabs, which do not cause a problem either.

GIMP Palette
0	0	0	000000
29	43	83	1d2b53
126	37	83	7e2553
0	135	81	008751
171	82	54	ab5236
95	87	79	5f574f

Thank you for considering this issue.

Hi @behreandtjeremy,

the problem is cause by the leading spaces at the beginning of a line.
I fixed this for the upcoming 8.0.11.

-Jan

1 Like