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

psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Possible alternate colorspaces for video game palettes.

Post by psycopathicteen »

I was thinking about colorspaces today, and I came up with a decent idea for a color space that can easily be converted to low-bit rgb, that should be a little more visually uniform than rgb.

I think I'll call it Yab, just because the Y works like the Y in YUV and YIQ, and the A and B work sort've like the A and B in Lab. So here's my formula.

R = Y + 2a + b
G = Y - a
B = Y - 3b

Any advice to improve upon this. I'm thinking there should be a way to compensate for the not-so-predictable luminance value of highly saturated colors.
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: Possible alternate colorspaces for video game palettes.

Post by lidnariq »

This doesn't really look all that much more useful than RGB?

Here's a simple cube, 0≤Y≤7, -4≤a,b≤3:
yab.png
yab.png (615 Bytes) Viewed 8656 times
Lots of out-of-gamut colors too.

No yellows, and lackluster reds and purples.
Sik
Posts: 1589
Joined: Thu Aug 12, 2010 3:43 am

Re: Possible alternate colorspaces for video game palettes.

Post by Sik »

Maybe A/B range from 0 to 7, not -4 to 3?
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Possible alternate colorspaces for video game palettes.

Post by psycopathicteen »

Or try -7 to 7. BTW, why is everything so dark?
User avatar
Dwedit
Posts: 4922
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Possible alternate colorspaces for video game palettes.

Post by Dwedit »

Sounds very similar to YCgCo, but not quite the same.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Possible alternate colorspaces for video game palettes.

Post by psycopathicteen »

Dwedit wrote:Sounds very similar to YCgCo, but not quite the same.
I never heard of that before, but it sounds awesome.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Possible alternate colorspaces for video game palettes.

Post by psycopathicteen »

I made a 12-bit YCoCg color palette. It's cool how it ended up being exactly 1024 colors. That means if I make a 15-bit version, it will come out with 8192 colors.
Attachments
YCoCg.png
YCoCg.png (2.55 KiB) Viewed 8514 times
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: Possible alternate colorspaces for video game palettes.

Post by Drew Sebastino »

I always wondered how having 6bit RGB with 2 extra bits to reduce the value of the color for every channel. Because your eyes are supposedly better at seeing shades of color than different colors or something like that, I wonder if it might even look better than 9bit RGB despite only being half the colors.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Possible alternate colorspaces for video game palettes.

Post by tepples »

That's a form of RGBI, with 2 bits per channel. It's the componentwise sum of the Cartesian product of four 2-bit palettes:

Red: #000, #400, #800, #C00
Green: #000, #040, #080, #0C0
Blue: #000, #004, #008, #00C
Intensity: #000, #111, #222, #333

Fortunately, GIMP makes componentwise sums easy using the Addition blend mode.
Attachments
The four subpalettes
The four subpalettes
layers.png (738 Bytes) Viewed 8489 times
The palette
The palette
added.png (1.42 KiB) Viewed 8489 times
Parrot in RGBI2222. Left: not dithered; right: Floyd-Steinberg dithered.
Parrot in RGBI2222. Left: not dithered; right: Floyd-Steinberg dithered.
parrot.png (31.01 KiB) Viewed 8489 times
Sik
Posts: 1589
Joined: Thu Aug 12, 2010 3:43 am

Re: Possible alternate colorspaces for video game palettes.

Post by Sik »

May as well compare it against my colorspace:

Image

RGB 3.3.3, but red and blue share the LSB (so it fits in 8-bit). I came up with it because I honestly hate how little resolution blue has in RGB 3.3.2, which wouldn't be much of an issue except because it seems new "retro" hardware insists on using that (argh!).
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: Possible alternate colorspaces for video game palettes.

Post by Drew Sebastino »

I thought I'd try seeing how Sik's palette looks:
Sik's Palette.png
Sik's Palette.png (13.58 KiB) Viewed 8435 times
zzo38
Posts: 1096
Joined: Mon Feb 07, 2011 12:46 pm

Re: Possible alternate colorspaces for video game palettes.

Post by zzo38 »

I thought of a different kind of colorspace: 3-bits high-voltage, 3-bits low-voltage, 3-bits phase. The phase only covers half, because you can get the rest of the phases by inverting it which is done by switching the voltage. If high-voltage and low-voltage is same then the picture will be gray.
(Free Hero Mesh - FOSS puzzle game engine)
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: Possible alternate colorspaces for video game palettes.

Post by lidnariq »

Espozo wrote:I always wondered how having 6bit RGB with 2 extra bits to reduce the value of the color for every channel.
tepples wrote:It's the componentwise sum of the Cartesian product of four 2-bit palettes:
I assumed that Espozo meant something with a multiplier, not RGBI.

Here's the equivalent palette where I parse the last two bits as a all-channels multiplier that ranges from 1 to 4:
rgbmult.png
rgbmult.png (1.24 KiB) Viewed 8402 times
It's really lacking in pastels, though, so the parrot doesn't look so good:
left: plain<br />right: floyd-steinberg dithering
left: plain
right: floyd-steinberg dithering
rgbmultparrot.png (29.77 KiB) Viewed 8402 times
Sik
Posts: 1589
Joined: Thu Aug 12, 2010 3:43 am

Re: Possible alternate colorspaces for video game palettes.

Post by Sik »

Actually his description sounds more like reverse RGBI, where I substracts instead of adding (you could achieve that just by passing I through a NOT). But yeah it's not very clear honestly.
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: Possible alternate colorspaces for video game palettes.

Post by Drew Sebastino »

Yeah, I didn't mean multiplying. I meant what Sik is talking about. I'm not sure how different than would look than tepples's though.
Post Reply