Possible alternate colorspaces for video game palettes.

A place for your artistic side. Discuss techniques and tools for pixel art on the NES, GBC, or similar platforms.

Moderator: Moderators

JRoatch
Formerly 43110
Posts: 422
Joined: Wed Feb 05, 2014 7:01 am
Contact:

Re: Possible alternate colorspaces for video game palettes.

Post by JRoatch »

Ahh sorry lidnariq, my mistake. I was implying 4 bit values and results with those modular additions, and I see that I accidentally swapped my red and blue in that pseudocode.

A small python 3 program that correctly generates it as a GIMP Palette is:

Code: Select all

print("""GIMP Palette
Name: RGBI Arranged.
Columns: 16
#""")
for i in range(256):
    print(((((i>>4)&0xc)+i)&0xf)*17, (i&0xf)*17, ((((i>>2)&0xc)+i)&0xf)*17)
Post Reply