AuthorTopic: What is best 256 color palette?  (Read 42639 times)

Offline ptoing

  • 0101
  • ****
  • Posts: 3063
  • Karma: +0/-0
  • variegated quadrangle arranger
    • the_ptoing
    • http://pixeljoint.com/p/2191.htm
    • View Profile
    • Perpetually inactive website

Re: What is best 256 color palette?

Reply #20 on: September 14, 2015, 05:09:09 pm
This is a pretty nonsensical question, simply because there is not a one fits all scenario. Look at old VGA DOS games. Those have a palette of 256 colours at once. Some of them do clever stuff to change colours between levels and other things.

Dor example, look at Doom, Heretic, or Quake. Those games all only have 256 colours on screen max at any given time, but they have very different atmospheres. And that has a lot to do with which colours were picked by the artists. In general when it comes to making games for art you should always develop your palette with your intended assets and the game as a whole in mind. What feelings to you want to evoke, what things are important to stand out, how do you guide the player (can be done with colours and lights for example, etc.
There are no ugly colours, only ugly combinations of colours.

Offline Piotr

  • 0001
  • *
  • Posts: 71
  • Karma: +0/-1
    • View Profile
    • google.pl

Re: What is best 256 color palette?

Reply #21 on: September 30, 2015, 03:56:19 pm
I've tried it. My results with K-means clustering of LAB or LCH colorspaces were 'best', but still not all that satisfactory.

Currently, HUSL seems like the best colorspace for attempting to programmatically derive a palette from. HSY is simpler but also less well optimized (in terms of maximizing difference between colors), though it is better than HSL.

I've tried YIQ and YCbCr, IMO they are better than RGB but otherwise fairly unremarkable.

I recommend entirely ignoring HSV: it is possibly the worst colorspace I've encountered in terms of providing meaningful measures of difference between colors.

Finally, if you're going to do what Gil suggests, keep in mind the algorithm you use for reduction. Most palette reducers use some kind of median cut, which generally reduces contrast by minimizing extreme values, so consider increasing contrast before reduction, to compensate.
It's more important to provide equally spaced components, because it's possible to increase number of values for one component and reduce it for others. 6-8-5 values in RGB with gamma correction is good. I said YIQ may be best because it's better for reducing values. YCbCr, for example, includes all luminance information in one component, allowing for reduction of other components. In RGB, every component has varying degrees of luminance information, making using reduction giving more loss in palette. Still, green includes most luminance information.

Offline Ai

  • 0100
  • ***
  • Posts: 1057
  • Karma: +2/-0
  • finti
    • http://pixeljoint.com/pixels/profile.asp?id=1996
    • finticemo
    • View Profile

Re: What is best 256 color palette?

Reply #22 on: September 30, 2015, 10:52:49 pm
I'd generally suggest that best (most accurate summarization of original colors) reduction performance is achieved with a perceptually-tuned colorspace like LAB. And I must point out that having all luminance information in one channel is a goal it achieves. Not perfectly IMO, but noticably better than YCbCr or YIQ, which was an earlier and simpler technology.

However, if you are generating colorcubes, as your comment about 'equally spaced values' suggests, this is a completely different situation from reducing colors, and I'll stand by my comment of HUSL being the best in this case (combines the merits of LAB and HSL).
If you insist on being pessimistic about your own abilities, consider also being pessimistic about the accuracy of that pessimistic judgement.

Offline Gil

  • 0100
  • ***
  • Posts: 1543
  • Karma: +1/-0
  • Too square to be hip
    • http://pixeljoint.com/p/475.htm
    • View Profile
    • My Portfolio

Re: What is best 256 color palette?

Reply #23 on: October 01, 2015, 01:05:26 pm
Piotr, you seem to take a very "programmer"-style approach to all this. The stuff you suggest just isn't what an artist working with your palette would like to see. You'd end up with what a programmer would call an "excellent palette", leaving artists to scream at their screen. For example, almost any artist would prefer it if a palette worked well for creating assets, even if that meant components aren't spaced close to equally. For example, artist will probably shift colors from dark areas to light, so there's more indices in the lighter end of the spectrum versus the darker. This will make the art very crude in shadowy parts and that will make a programmer go "look at these artifacts in the dark end, that's just not right!", forgetting to take in account the fact that the lighter end of the art looks 5 times as good.

Also, I see you post stuff like this palette:


No artist on this forum would enjoy making games with this palette, apart from maybe a demo-scene-style curiosity.

Offline Piotr

  • 0001
  • *
  • Posts: 71
  • Karma: +0/-1
    • View Profile
    • google.pl

Re: What is best 256 color palette?

Reply #24 on: October 01, 2015, 02:50:10 pm
I'd generally suggest that best (most accurate summarization of original colors) reduction performance is achieved with a perceptually-tuned colorspace like LAB. And I must point out that having all luminance information in one channel is a goal it achieves. Not perfectly IMO, but noticably better than YCbCr or YIQ, which was an earlier and simpler technology.

However, if you are generating colorcubes, as your comment about 'equally spaced values' suggests, this is a completely different situation from reducing colors, and I'll stand by my comment of HUSL being the best in this case (combines the merits of LAB and HSL).
I said equally spaced values. Equally spaced means there is equal difference in each consecutive values of one component. For example, in 0, 128, 255, the 128 is closer to 0 due to gamma correction, and can be increased.

Offline Piotr

  • 0001
  • *
  • Posts: 71
  • Karma: +0/-1
    • View Profile
    • google.pl

Re: What is best 256 color palette?

Reply #25 on: October 01, 2015, 03:06:14 pm
Piotr, you seem to take a very "programmer"-style approach to all this. The stuff you suggest just isn't what an artist working with your palette would like to see. You'd end up with what a programmer would call an "excellent palette", leaving artists to scream at their screen. For example, almost any artist would prefer it if a palette worked well for creating assets, even if that meant components aren't spaced close to equally. For example, artist will probably shift colors from dark areas to light, so there's more indices in the lighter end of the spectrum versus the darker. This will make the art very crude in shadowy parts and that will make a programmer go "look at these artifacts in the dark end, that's just not right!", forgetting to take in account the fact that the lighter end of the art looks 5 times as good.

Also, I see you post stuff like this palette:
{placeholder}

No artist on this forum would enjoy making games with this palette, apart from maybe a demo-scene-style curiosity.
That image was just an attempt forgetting some things. For 256 colors question, I'm trying to combine the goals of programmer and artist perceptions. The images in first post showed example palettes, not intended to be candidates or good palettes. In RRGGBBSS format where S is shared least significant bit, very light/dark colors must be grays or be oversaturated. I really don't know if it's good enough. Does combining unique palettes of several games with about 30 colors each produce great results? (Unique means that colors in palettes are different enough to add up to 256 colors. Keep in mind that 256 color game can be reduced to 32 colors and still be usable.)
PS A 256 color palette fully hand-picked would take a lot of time and I am not very good in making hand-picked palettes.
« Last Edit: January 08, 2017, 03:49:50 pm by Piotr »

Offline Ai

  • 0100
  • ***
  • Posts: 1057
  • Karma: +2/-0
  • finti
    • http://pixeljoint.com/pixels/profile.asp?id=1996
    • finticemo
    • View Profile

Re: What is best 256 color palette?

Reply #26 on: October 01, 2015, 03:08:39 pm
I'd generally suggest that best (most accurate summarization of original colors) reduction performance is achieved with a perceptually-tuned colorspace like LAB. And I must point out that having all luminance information in one channel is a goal it achieves. Not perfectly IMO, but noticably better than YCbCr or YIQ, which was an earlier and simpler technology.

However, if you are generating colorcubes, as your comment about 'equally spaced values' suggests, this is a completely different situation from reducing colors, and I'll stand by my comment of HUSL being the best in this case (combines the merits of LAB and HSL).
I said equally spaced values.
So did I. Seriously, read my post. It says 'equally spaced values'. You quoted it.
I have no idea why you think you need to correct me on that.

Quote
Equally spaced means there is equal difference in each consecutive values of one component. For example, in 0, 128, 255, the 128 is closer to 0 due to gamma correction, and can be increased.
That is not what equally spaced values means, though. if 128 is increased to, eg. 130, then values are no longer equally spaced.

As far as I can see you are talking about generating an equally spaced gradient in Linear RGB, then converting it to sRGB (at which point, the gradient -looks- equally spaced to the eye, and the -values- are no longer equally spaced.).

If you insist on being pessimistic about your own abilities, consider also being pessimistic about the accuracy of that pessimistic judgement.

Offline Piotr

  • 0001
  • *
  • Posts: 71
  • Karma: +0/-1
    • View Profile
    • google.pl

Re: What is best 256 color palette?

Reply #27 on: October 01, 2015, 03:14:15 pm
I'd generally suggest that best (most accurate summarization of original colors) reduction performance is achieved with a perceptually-tuned colorspace like LAB. And I must point out that having all luminance information in one channel is a goal it achieves. Not perfectly IMO, but noticably better than YCbCr or YIQ, which was an earlier and simpler technology.

However, if you are generating colorcubes, as your comment about 'equally spaced values' suggests, this is a completely different situation from reducing colors, and I'll stand by my comment of HUSL being the best in this case (combines the merits of LAB and HSL).
I said equally spaced values.
So did I. Seriously, read my post. It says 'equally spaced values'. You quoted it.
I have no idea why you think you need to correct me on that.
I said "I said equally spaced values. Equally spaced means there is equal difference in each consecutive values of one component. For example, in 0, 128, 255, the 128 is closer to 0 due to gamma correction, and can be increased.".
Note it said one component. This allows it to be mixed with component reduction. Equal spaces in one component are independent of same in other component.
My question is "best palette", not "best palette with equally spaced values". I didn't mean to use exact general definition. Take gamma correction, and both equally spaced values and reduction into account.
« Last Edit: October 01, 2015, 03:18:26 pm by Piotr »

Offline Ai

  • 0100
  • ***
  • Posts: 1057
  • Karma: +2/-0
  • finti
    • http://pixeljoint.com/pixels/profile.asp?id=1996
    • finticemo
    • View Profile

Re: What is best 256 color palette?

Reply #28 on: October 01, 2015, 03:16:46 pm
.. So, what you're really trying to say is that you're not generating colorcubes, but something more complicated?
If you insist on being pessimistic about your own abilities, consider also being pessimistic about the accuracy of that pessimistic judgement.

Offline Piotr

  • 0001
  • *
  • Posts: 71
  • Karma: +0/-1
    • View Profile
    • google.pl

Re: What is best 256 color palette?

Reply #29 on: October 01, 2015, 03:20:21 pm
.. So, what you're really trying to say is that you're not generating colorcubes, but something more complicated?
Your question: Yes, but only if it's possible.
Talk: Read changes in my comments.