Followup: "Sorting" colors by diversity

Original Question

If you are offered N maximally remote colors (and also some linked range statistics), can you think of a means to arrange those colors right into some order such that the first M are additionally sensibly near being a maximally distinctive set?

To put it simply, offered a number of distinctive colors, think of a getting so I can make use of as several colors as I require beginning at the start and also be sensibly ensured that they are all distinctive which neighboring colors are additionally really distinctive (e.g., blue red isn't alongside red blue).

Randomizing is ALRIGHT yet absolutely not optimum.

Explanation: Offered some huge and also aesthetically distinctive set of colors (claim 256, or 1024), I intend to arrange them such that when I make use of the first, claim, 16 of them that I get a reasonably aesthetically distinctive part of colors. This is equal, about, to claiming I intend to arrange this checklist of 1024 to make sure that the more detailed specific colors are aesthetically, the further apart they get on the checklist.

0
2019-05-04 02:23:26
Source Share
Answers: 5

This trouble is called shade quantization, and also has actually several popular formulas: http://en.wikipedia.org/wiki/Color_quantization I recognize individuals that applied the octree strategy to excellent result.

0
2019-05-30 23:18:32
Source

It appears assumption is necessary to you, because instance you could intend to take into consideration collaborating with an affective shade room such as YUV, YCbCr or Lab. Everytime I've made use of those, they have actually offered me better outcomes than sRGB alone.

Transforming to and also from sRGB can be a discomfort yet in your instance it can in fact make the algorithm less complex and also as an incentive it will primarily benefit shade blinds also!

0
2019-05-30 22:37:17
Source

Do you suggest that from a set of N colors, you require to select M colors, where M < N, such that M is the ideal depiction of the N colors in the M room?

As a far better instance, lower a true-color (24 little bit color room ) to a 8-bit mapped shade room (GIF? ).

There are quantization formulas for this, like the Adaptive Spatial Subdivision algorithm made use of by ImageMagic.

These formulas generally do not simply select existing colors from the resource room yet develops new colors in the target room that the majority of very closely appear like the resource colors. As a streamlined instance, if you have 3 colors in the initial photo where 2 are red (with various strength or blue colors and so on ) and also the 3rd is blue, and also require to lower to 2 colors, the target photo can have a red shade that is some sort of standard of the initial 2 red + heaven shade from the initial photo.

If you require another thing after that I really did not recognize your inquiry : )

0
2019-05-07 19:02:48
Source

You can divide them in to RGB HEX layout to make sure that you can contrast the R with R's of a various shade, very same with the G and also B.

Same layout as HTML

XX XX XX
RR GG BB

00 00 00 = black
ff ff ff = white
ff 00 00 = red
00 ff 00 = green
00 00 ff = blue
.

So the only point you would certainly require to determine is just how close you desire the colors and also what is an appropriate distinction for the sectors to be taken into consideration various.

0
2019-05-07 18:57:53
Source

This additionally appears to me like some sort of resistance chart where you attempt to draw up the course of the very least resistance. If you inverted the needs, course of maximum resistance, it can probably be made use of to generate a set that from the beginning generates maximum distinction as you go, and also in the direction of completion begins to return to values closer to the others.

As an example, below's one means to probably do what you desire.

  1. Compute the range (ref your other post ) from each shade to all various other colors
  2. Sum the ranges for each and every shade, this offers you a sign for just how away this shade is from all various other colors in complete
  3. Order the checklist by range, dropping

This would certainly, it appears, generate a checklist that begins with the shade that is farthest far from all various other colors, and afterwards drop, colors in the direction of completion of the checklist would certainly be closer to various other colors as a whole.

Edit : Reading your respond to my first blog post, concerning the spatial community, would certainly not specifically fit the above summary, given that colors near various other colors would certainly be up to all-time low of the checklist, yet allow's claim you have a collection of colors someplace, at the very least among the colors from that collection would certainly lie near the start of the checklist, and also it would certainly be the one that usually was farthest far from all various other colors in total amount. If that makes good sense.

0
2019-05-07 18:44:51
Source