Trying to figure out which RGB palette is canonical

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

Moderator: Moderators

marcosmoutta
Posts: 18
Joined: Mon Aug 17, 2020 1:41 pm

Trying to figure out which RGB palette is canonical

Post by marcosmoutta »

Everybody knows the NES doesn't output RGB, and it's not by coincidence NTSC stands for never the same color (I know it doesn't, chill) - in practice, defining an RGB palette for the NES is a matter of taste and opinion.
But that doesn't cut it for me.
I'm trying to figure out which palette was the "intended" one. Yes, there does exist an official RGB palette for the NES, but it was designed to artificially enhance some first party games and looks horrible overall. Besides, no sane dev made games with it in mind, right? Devkits had stock chips, right?

So here's what I want to know:
1- Do the NES and Famicom output different colors? Awful online research seems to indicate otherwise, but it doesn't hurt to ask. If they do, it becomes abundantly obvious using the NES as a reference is fruitless.
2- Does anyone know what Nintendo intented the colors to be? Is there official reference material with them?
3- How did devs pick colors? Did they just pick values, assemble and check how the sprites look on the TVs? If so, what TV did Konami use? If not, what did they reference?
4- Has anyone who knows their stuff made an RGB palette? Like say, an engineer who helped design the Famicom or maybe M2? There is this FirebrandX guy who made palettes based on how his US system looks on a PVM, but the colors are way too brownish and NTSCesque. It can't possibly be what anyone wanted.

To sum it up, I think discovering what Konami, Capcom etc viewed as the Famicom palette (and making an RGB palette based on it) would produce the "canonical" NES palette. Are there any leads on this?
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Trying to figure out which RGB palette is canonical

Post by lidnariq »

marcosmoutta wrote: Mon Jan 31, 2022 9:38 pm 1- Do the NES and Famicom output different colors? Awful online research seems to indicate otherwise, but it doesn't hurt to ask. If they do, it becomes abundantly obvious using the NES as a reference is fruitless.
We can just stop here: different versions of the PPU generate (subtly) different colors.

Different real-world versions of the NTSC PPU have different amounts of hue changing as a function out of output brightness ("differential phase distortion"). The 2C02E generates smaller differences in hue angle as a function of brightness than the 2C02G. (And the hues of the PAL PPU are rotated by 15 degrees relative to the "ideal" NTSC PPU anyway)

Furthermore, several of the colors generated by the PPU are "out of gamut" - when decoded they correspond to regions of negative red, green, or blue, and different TVs do different things with that result.

You might want to play around with http://drag.wootest.net/misc/palgen.html ... even though it doesn't handle the differential phase distortion.
marcosmoutta
Posts: 18
Joined: Mon Aug 17, 2020 1:41 pm

Re: Trying to figure out which RGB palette is canonical

Post by marcosmoutta »

lidnariq wrote: Mon Jan 31, 2022 10:08 pm
marcosmoutta wrote: Mon Jan 31, 2022 9:38 pm 1- Do the NES and Famicom output different colors? Awful online research seems to indicate otherwise, but it doesn't hurt to ask. If they do, it becomes abundantly obvious using the NES as a reference is fruitless.
We can just stop here: different versions of the PPU generate (subtly) different colors.
As you said, they generate SUBTLY different colors. Not completely different colors like you see on different RGB palettes. Besides, that was just one point of view, I listed others in case it was fruitless (which it is, thanks for the intel). I'm still on the look for what palette was supposed to be the real one.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Trying to figure out which RGB palette is canonical

Post by lidnariq »

TVs in Japan and the US changed canonical decoding rules during the NES's commercial lifespan, from (pre-1987 NTSC-J) and FCC1953 to (post-1987 NTSC-J) and FCC D65. Even aside from all other constraints, what developers saw from the same Famicom and NES on TVs in 1985 is different from what they saw on TVs in 1991.

Several of the colors in the NES's palette correspond to Y,U,V or R,G,B components that are outside of the permitted range. Every TV made by different manufacturers or in different years will have made a different compromise for what happens in that situation.

So you can probably say "what is the closest RGB representation of what was displayed on the specific TVs used when developing the first-party Nintendo games for the US NES launch", but you certainly can't say that that the palette is the same for other development houses or for other years.
marcosmoutta
Posts: 18
Joined: Mon Aug 17, 2020 1:41 pm

Re: Trying to figure out which RGB palette is canonical

Post by marcosmoutta »

lidnariq wrote: Mon Jan 31, 2022 10:57 pm (pre-1987 NTSC-J) and FCC1953
Are these two the same? Because I'm totally willing to accept "pre 1987 ntsc J" as canonical
Would you happen to know of palette files constructed based on the standards you pointed?
Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: Trying to figure out which RGB palette is canonical

Post by Drag »

The only canonical palette information we have is what the NES/FC physically outputs in terms of luma and chroma. The luma signal is just raw voltage levels, and the chroma signal is the modulated one which depends on the circuitry of the monitor receiving the signal.

Luminance is the most well-defined part of the palette
  1. The grayscale columns (0, D, E, and F) are just raw voltage levels, so they're the only colors you can expect to look identical between monitors.
  2. For each row, columns (1..C) have a luminance value half-way between the grays in columns 0 (which is always lighter) and D (which is always darker).
    • That's because these colors are created by outputting a 50% duty square wave, alternating between color 0 and color D for that row.
  3. YIQ/YUV both take luma (Y) and add a color component on top. Therefore, the chroma component ought not affect the luminance of the output color, and therefore, you can expect the luminance value for each color to be the same between monitors (or similar enough to not be showstopping)
Color is subjective but there's still some constants we can expect
  1. The chroma for column 8 is used as the colorburst reference. Colorburst is a yellowish color. The phase difference between columns is too great to fine-tune to a "better" yellow, so therefore, no column is "yellower" than column 8.
  2. From columns 1..C (looping around), the purest red, green, and blue will be 4 columns apart from each other.
  3. Blue is the complement of yellow. If column 8 is the most "yellowish" color, then column 2 must be the most "bluish" color.
  4. If column 2 is the most "bluish", then column 6 must be the most "reddish", and column A must be the most "greenish".
    • This is also backed up by how the color emphasis bits in the PPU work.
Saturation...?
You can expect the relative saturation between rows to be the same between monitors, because saturation is derived from the amplitude of the color carrier signal. For each row, that amplitude will be the difference between the luminance value of column 0 and column D.
The problem is, I don't have a good anchor point for a common baseline for how saturated the palette is supposed to be overall, but I don't think that's a huge problem so I usually just eyeball it.

Variables
Nobody agrees on the exact hue or the exact saturation, hence why my language is "most yellowish", "most bluish", etc. It may not be an exact yellow, it may not be an exact blue, but in terms of the palette at large, columns 2, 6, 8, and A should be the strongest of their respective colors blue, red, yellow, and green, with respect to the other columns in the palette.

Finally, the most ideal NES/FC palette is one that most modern monitors (as of 2022 at least) will be unable to display (many light blue and light red colors are out of RGB range), so just be aware of that. :P
marcosmoutta
Posts: 18
Joined: Mon Aug 17, 2020 1:41 pm

Re: Trying to figure out which RGB palette is canonical

Post by marcosmoutta »

Drag wrote: Tue Feb 01, 2022 4:33 pm
Finally, the most ideal NES/FC palette is one that most modern monitors (as of 2022 at least) will be unable to display (many light blue and light red colors are out of RGB range), so just be aware of that. :P
Is this why the lighter colors from the bottom collumn are so damn hard to see?

Also, thanks for all the knowledge! Does the PC10 palette follow the details you gave? I think the reason it looks so garish is it doesn't, right?
Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: Trying to figure out which RGB palette is canonical

Post by Drag »

If the lightest row of colors is hard to see, you might have your monitor adjusted too bright, or your screen might wash light colors out too much. The yellow/green/cyan half of row 3x should be perfectly discernible since that's usually in-gamut.

I wasn't working at Nintendo during the development of the PC10 (or, in fact, at any point of my life :P), so I can't provide any insight on how the various RGB PPUs had their palettes created. If I had to guess, they probably had somebody eyeball the colors until they looked good enough.

What I can say is, while I was developing my palette generator, I noticed that when you lower the contrast level of the palette, you can bring the out-of-gamut colors back into RGB range without needing to clip anything, in which case, they should look pretty faithful. This has the effect of darkening the entire palette though, but if the entire screen is like that, you won't notice anything, and I think this is what Nintendo did with the Virtual Console NES titles, because the palette they use there is similarly dark.

When I'm drawing graphics for the NES, I'll periodically check how it looks with a darkened palette to get an idea of what it's probably going to look like on the actual hardware, but I still design with the expectation that most everyone will use a more normal "bright" palette. (Between you and me, I'm actually expecting most people to use a FirebrandX palette since that's what made it onto the MiSTer ;) )
marcosmoutta
Posts: 18
Joined: Mon Aug 17, 2020 1:41 pm

Re: Trying to figure out which RGB palette is canonical

Post by marcosmoutta »

Drag wrote: Wed Feb 02, 2022 12:18 pm
What I can say is, while I was developing my palette generator, I noticed that when you lower the contrast level of the palette, you can bring the out-of-gamut colors back into RGB range without needing to clip anything, in which case, they should look pretty faithful. This has the effect of darkening the entire palette though, but if the entire screen is like that, you won't notice anything, and I think this is what Nintendo did with the Virtual Console NES titles, because the palette they use there is similarly dark.
Oh man that's so cool I had no idea you were the one whk made that. What's the base palette based on?
Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: Trying to figure out which RGB palette is canonical

Post by Drag »

The base palette is based on my childhood Panasonic TV (which has seen pretty much every game console I've ever owned up until the xbox 360), which I usually keep my NES hooked up to. I basically just tweaked the hue, saturation, contrast, etc, until it looked right, and the settings I liked best ended up as the default settings when you first open the palette generator. (I know those settings won't work for everyone, but that's why it's a generator instead of just a palette :P)

Here's a link to the thread from when I was developing it in case it's interesting.
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Trying to figure out which RGB palette is canonical

Post by Dwedit »

I just really like Nintendulator's palette.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
marcosmoutta
Posts: 18
Joined: Mon Aug 17, 2020 1:41 pm

Re: Trying to figure out which RGB palette is canonical

Post by marcosmoutta »

Dwedit wrote: Sat Feb 05, 2022 11:02 pm I just really like Nintendulator's palette.
Any palette that doesn't make the ship in Castlevania 3 green doesn't offend me
User avatar
DRW
Posts: 2225
Joined: Sat Sep 07, 2013 2:59 pm

Re: Trying to figure out which RGB palette is canonical

Post by DRW »

lidnariq wrote: Mon Jan 31, 2022 10:08 pm We can just stop here: different versions of the PPU generate (subtly) different colors.
What exactly does that mean? Is this a phenomenon between Famicom, NTSC NES, PAL NES and top loader? Or maybe a difference between the first batch of Famicoms (with the square buttons) and later versions?

Or is this actually a difference that can occur between regular standard NTSC front loader NES consoles, in the way that, for example, a 1985-produced console generates slightly different colors from a 1990-produced console?
My game "City Trouble":
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Trying to figure out which RGB palette is canonical

Post by lidnariq »

DRW wrote: Wed Aug 03, 2022 4:10 pm Is this a phenomenon between Famicom, NTSC NES, PAL NES and top loader? Or maybe a difference between the first batch of Famicoms (with the square buttons) and later versions?
All of the above.

PAL hue angles are already thought to be off by 15 degrees relative to NTSC ideal, but it turns out it's worse than that.

Brighter colors on the NES are "slower", and on the 2C02G each row of colors is about 5 degrees more (clockwise? I forget), so $08 is greener and $38 is yellower.

This rotation is less on the 2C02E, and we haven't tried quantifying this on other consoles.

On PAL, "Telefunken" decoding means that regions of solid color have this effect fixed, but any effort to explicitly use PAL's normal vertical chroma subsampling for more colors will give shifted results for the same reason that NTSC does: viewtopic.php?p=133640#p133640
User avatar
DRW
Posts: 2225
Joined: Sat Sep 07, 2013 2:59 pm

Re: Trying to figure out which RGB palette is canonical

Post by DRW »

So, what about my alternative point? Since I'm not really interested in the difference between PAL and NTSC (since they are different anyway), nor do I care about the first Famicom batch with the different controllers, I'm really only interested in this one question:

Are those subtly different colors due to different PPU revisions also a phenomenon within different batches of the regular front loader NTSC NES?
My game "City Trouble":
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
Post Reply