A more accurate NES palette?

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

Moderator: Moderators

User avatar
Marscaleb
Posts: 240
Joined: Fri Sep 11, 2015 10:39 am
Contact:

A more accurate NES palette?

Post by Marscaleb »

I was drawing out some NES art when I started noticing some discrepencies between the palette I was using and the colors being used in various NES images I was sampling.

For example, comparing this image:
Image

to this one:
Image

The one on the top has the 0 row much darker and the 3 row much lighter, compared to the one one the bottom.
On a good monitor, the difference is negligible. But on many monitors the difference is much more stark. On one of my screens the 0 row is barely visible.
I'm having a hard time defining my colors because one palette might be to extreme and another might show too little difference. The exact shade of green I'm looking for could be 1A or 2A; the differences are so strong that I can't even tell which color I would want to use.

This has led me to wonder what exact color palette I should use to best emulate an NES display.

Now, I do understand that the NES didn't actually operate in RGB colorspace, so there's not quite going to be a single exact answer. Hell, as I understand it the hardware directly created an analog signal, so even the hardware itself wasn't *quite* exact.

But even so, people use a lot of emulators. Even Nintendo uses emulators. So, there ought to be some kind of standard available. What is typically the most common? What is typically most accepted? What have people found to look the best on monitors today? What most faithfully emulates the look the had on the old CRT screens?
Something along those lines ought to produce an answer as to what palette I ought to use.
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: A more accurate NES palette?

Post by lidnariq »

Everyone's (especially CRT) television is configured differently, with different gammas, different brightness, saturation, and sometimes wrong hues adjustments.

Just use Drag's generator and pick some values that look good to you, and stop worrying about it—there's nothing you can do to control it otherwise.

That said, the link from bowdenweb.com is conspicuously wrong: color $1D is identical to colors $xE and $xF. Whether that color should be displayed as #000000 black is a separate question.
User avatar
Marscaleb
Posts: 240
Joined: Fri Sep 11, 2015 10:39 am
Contact:

Re: A more accurate NES palette?

Post by Marscaleb »

lidnariq wrote: Just use Drag's generator and pick some values that look good to you, and stop worrying about it—there's nothing you can do to control it otherwise.
That's a handy little tool. Does is have any documentation? I'm not quite sure what the values I'm tweaking are doing; it would be nice to read some formal explanation.

Also, at the very least I would like to know what kind of palette most emulators are using.
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: A more accurate NES palette?

Post by lidnariq »

CIE graph:
Plots the X/Y locations in the CIE XYZ colorspace for all 48 non-greys that the NES can produce.

Clipping style:
The NES produces a bunch of colors that are "Out of gamut", corresponding to colors that can't be represented in YIQ or RGB (because they correspond to out-of-range values, e.g. negative green, blue more than 100%, Q more than 0.525, &c). I believe there was no standard specifying what is the correct thing to do in such a situation, so different televisions vary in what happens.

Tuning:
Hue, Saturation, Brightness, Contrast, and Gamma are hopefully terms you've already comfortable with?

Range:
NTSC "properly" encodes its color signal using quadrature amplitude modulation in a manner that can be broken down into I (in-phase) and Q (quadrature). I and Q differ both in the permissible amplitudes of each direction and the bandwidth alloted. In practice, this is a selective saturation control on the two NTSC color axes.

PAL (and every other more modern standard) just use YUV≈YPrPb.

View:
Should be obvious?

Colorimetry:
There have been several different versions of the RGB phosphors used on the CRTs over the years, and several different standards as to how to correctly convert things accordingly.

Custom:
If you choose "custom colorimetry", you can specify the location of these Standard illuminants in the CIE XYZ colorspace. Phosphors are different from LEDs are different from LCDs with CCFL backlights.
Also, at the very least I would like to know what kind of palette most emulators are using.
Emulators have been mostly moving away from baked-in RGB palettes and switching to calculating HSL on-the-fly. The official NES emulators on the Gamecube and Wii seem to have a baked-in set of YCbCr values, but I don't think we've extracted them.
User avatar
DragonDePlatino
Posts: 94
Joined: Mon Oct 20, 2014 1:50 pm

Re: A more accurate NES palette?

Post by DragonDePlatino »

Over the years, I've used several NES palettes. I used to try and find a balance of accuracy and beauty, but I've given up on the former. From what I understand, the conversation from YPbPr to RGB color just really doesn't work. So instead, I found a palette that just looked nice on computer monitors and I've been using that since.

Image

This was generated using bisqwit's NTSC palette generator with the saturation set to 2.0 and everything else left alone. It's a great palette because there's a lot of contrast, it's very vibrant and the red is actually red (not some weird tint of orange or magenta). The only downsides are that the greens don't have a lot of contrast and the yellow is a little dirty. I've found the orange to work as a nice substitute, though.

Here and here are some examples of it in action.
User avatar
Dwedit
Posts: 4921
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: A more accurate NES palette?

Post by Dwedit »

The second palette on the top post appears to be the Nesticle palette, which is awful. Especially how the dark blue color is pure bright blue.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
M_Tee
Posts: 430
Joined: Sat Mar 30, 2013 12:24 am
Contact:

Re: A more accurate NES palette?

Post by M_Tee »

I avidly stick by NEStopia's palette, but I take others into consideration when I develop.
Kizul Emeraldfire
Posts: 44
Joined: Wed Feb 23, 2005 3:46 pm

Re: A more accurate NES palette?

Post by Kizul Emeraldfire »

I apologize in advance for the long-winded rambling; it is early, and I've had not much sleep.

EDIT (2015/12/25): The palette in this post is now outdated. Please look for the newer post I've made in this thread, which contains a much better palette. :) The image shall remain attached for historical reasons.
M_Tee wrote:I avidly stick by NEStopia's palette, but I take others into consideration when I develop.
I used to; NEStopia's YUV palette is really good. :)

HOWEVER: to me, despite how good it is, some of the colors just didn't look right. So I busted out my NES, hooked it up to my old ATi TV Wonder Value Edition capture card, did some wizardry*, and came up with this:
Just what it says on the tin — or, in this case, in the file name. 'Cause it's within probably 10% or better of what my NES outputs. :)
Just what it says on the tin — or, in this case, in the file name. 'Cause it's within probably 10% or better of what my NES outputs. :)
Kizul's_90-percent-accurate_NES_palette.png (2.95 KiB) Viewed 25324 times
To explain why the blacks all probably look a bit odd: $0D is 'pure black', and $1D should actually be the same color as $xE and $xF (which I've made a super-dark charcoal black, just to separate them from $0D) — but since Bee 52 uses $0D as its 'main' black and uses $1D as an extra shade of gray (due to $0D brightening $1D, $xE, and $xF), I've made $1D a charcoal gray to reflect this, since no emulator I know of actually emulates this one weird brightness trick. Emulators hate it! Aside from NEStopia, anyway, but for that you have to have the colors be darker and set NEStopia's brightness to 0.30, which washes out all of the blacks — to, incidentally, the exact shade of charcoal gray that $1D is set to in my palette…

It's probably not perfect (and I learned the hard way that there's no such thing as a 'perfect' NES palette :(), but this palette is the first one I've found that I didn't feel like I needed to tweak the vibrance/hue/lightness of a specific color.

<disclaimer>In my opinion,</disclaimer> though, it is the most-accurate NES palette that exists. At the very least, it looks a lot better (again, in my opinion) than what's made by most NTSC palette generator things that various people have linked. (I can say with utmost confidence, however, that it looks much better than the emulator METROID Prime's GameCube game disc uses for emulating the original NES METROID game. :mrgreen: For some reason, that particular palette looks terrible on my old CRT television. Not that I play the NES version of the original METROID anyway; I prefer the FDS version for various reasons. :))

Anyway, I figured I'd share my palette in this thread here rather than making a new thread exclusively for it (since this palette is the product of my numerous attempts at trying to make a more-accurate NTSC NES palette). :mrgreen: If anyone wants to use this palette with their emulator of choice, I included it in the attached Zip file for convenience. :) The attached 8-bit PNG (above) also has the palette embedded, if anyone wants to use it for drawing NES-style graphics. :P

*Said wizardry consisted of me recording two-second-long uncompressed video clips of a single individual color of the NES palette — the whole screen was filled with a single color via Adventure Island II's debug mode, which allowed me to mess around with the palettes' colors — except that on my capture card, $0D, $1D, $xE, and $xF all look identical (particularly when the entire screen is filled with just that color), so I only recorded $0D and didn't bother with the other blacks, a total of 55 short clips.

Then I used VirtualDub to edit them (cropping and resizing them to be much smaller, running them through a huge stack of filters to smooth out noise), and then saved screenshots of a single frame from each clip and used the RGB values from the resulting frame for each cell in the palette, brightened it up slightly (because all of the colors were darker than they should've been), et voilà! The palette attached was born.
Last edited by Kizul Emeraldfire on Thu Dec 24, 2015 11:09 pm, edited 1 time in total.
User avatar
Dwedit
Posts: 4921
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: A more accurate NES palette?

Post by Dwedit »

Still like the Nintendulator palette, nice and colorful.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
AWJ
Posts: 433
Joined: Mon Nov 10, 2008 3:09 pm

Re: A more accurate NES palette?

Post by AWJ »

The most important thing is that colors in the same "row" don't vary wildly in brightness or saturation. Otherwise, later games that use shading like Ninja Gaiden 2 and 3, the later Mega Man's and the Final Fantasy's are going to look terrible. Examples of palettes that fail this test are Nesticle palette and the RGB PPU used in the Playchoice 10 etc. (Indeed I suspect the the palettes in Nesticle and other early emulators were based on box and magazine screenshots, which tended to be taken from RGB hardware)

Look at the monsters on the poster that came with Final Fantasy (which were clearly screenshotted from an RGB unit) The intended shading on monsters like the Giant and Ogre is completely lost.
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: A more accurate NES palette?

Post by dougeff »

Is it just me, or does color $12 ... and color $27... look vastly different in the different palettes here.
and maybe $03.


I'm still waiting for someone to produce palettes for all the other 'color emphasis' states.
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: A more accurate NES palette?

Post by dougeff »

Here, I made one with Rainwarrior's palette tool and Nintendulator and Photoshop.
Attachments
ColorEmphasis.png
nesdoug.com -- blog/tutorial on programming for the NES
Kizul Emeraldfire
Posts: 44
Joined: Wed Feb 23, 2005 3:46 pm

Re: A more accurate NES palette?

Post by Kizul Emeraldfire »

dougeff wrote:Here, I made one with Rainwarrior's palette tool and Nintendulator and Photoshop.
Hm, odd — I'd've thought that the emphasis would be somewhat 'uniform' across the various combinations, but it isn't. ò.O (Id est: on color $00 with the red emphasized, the RGB values are 108,64,59; I'd expect blue, then, to be 59,64,108; and green to be 59,108,64 — but they're not.)

Of course, I was actually expecting (again, using $00 as an example) that whichever color was to be 'emphasized' would stay the same as it was without color emphasis, and then the other color(s) would be reduced by 25% or so. In other words, for $00 with red emphasis, the red value would stay the same (101), and green and blue each would be reduced to 76; for 'yellow' emphasis (red + green), the RGB value would be 101,101,76. Having all the color emphasis bits enabled would change it to 76,76,76.

This is interesting, though mayhap I have very little knowledge of how color emphasis/de-emphasis works. :)
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: A more accurate NES palette?

Post by dougeff »

Re: not uniform.

I have no idea if Nintendulator implements the color emphasis the same as an actual NES. Maybe an NES would be more uniform.

Hmm, color $16 with emphasis 001 makes a good red...and color $36 with emphasis 011 makes a good yellow. And I really like the dark gray of $2d with all bits set. Maybe I should learn to use color emphasis more.

And, apparently (looking at Rainwarriors Palette Tool) you can change $2001 (color emphasis) mid-frame with no problems. So it's possible to use the standard color for one part of the screen, and a color emphasis on a lower part of the screen...doubling your color options.
nesdoug.com -- blog/tutorial on programming for the NES
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: A more accurate NES palette?

Post by tepples »

The NTSC or PAL composite signal has twelve phases, one for each rising and falling edge of the master clock that ticks six times for each cycle of the color subcarrier. Each color ($1-$C) alternates between high voltage level for six phases and a low voltage level for six phases. The TV decodes the difference between the high phase of the signal and the high phase of the "color burst" reference to the left of the picture, which has the same phase as color $08, into a hue value on the UV plane.

What red emphasis actually does on composite PPUs is darken the parts of the signal in the phases when $x6 would produce a low signal value. Likewise for green emphasis and $xA or blue emphasis and $x2. These phases are evenly spaced on the UV plane but not in RGB space.

Image
Illustration by Denelson83 of the graticule on an vectorscope for tuning NTSC color reception. The plot is in UV space and marked with the phases for pure red, green, and blue. Notice, for example, how much closer red (R) is to magenta (MG) than to yellow (YL).
Post Reply