5

I have a list of numeric values. I may normalize the values if needed.

I need to transform this list to a list of colors (in HSL, RGB or any other color model — I can always do conversion later).

For any given value the color must be the same every time.

The more different two given numeric values are, the more contrast corresponding values should be.

All used colors must be as contrast to each other as possible (this is a soft limitation, rough solution would do).

Note that list is rather large (thousands of numbers), so simply squeezing all numbers into a single color channel would produce too dense results.

4

4 に答える 4

2

選択した色空間で3D空間充填曲線を使用することを検討できます。マークのCIELAB提案を次にします。前回、同様の問題を解決しなければならなかったときにそのことを知っていればよかったのにと思います。

于 2009-01-30T23:37:48.690 に答える
2

最終的にどのアルゴリズムに落ち着いたとしても、CIELAB色空間を試すことができます。人間の色の知覚の違いを正規化するため、数値の間隔が等しいと知覚の違いが等しくなります。

于 2009-01-30T23:30:27.550 に答える
1

See: How to automatically generate N "distinct" colors?

It would be best to normalize your values, and run them through the code I suggested (where hue == your value), building a map/hash. (You can use a hash-style function instead, which is probably more efficient.)

You can "randomize" lightness (or brightness, depending on your model) and saturation using some predetermined bits of your number, for example.

于 2009-01-30T23:13:12.157 に答える
0

Why not use shades of gray? Just calculate the min/max values and use that to translate each number into a different shade from white to black.

I know it's not colors, but in my opinion it'll be easier to interpret the results. I can tell what it means when something is darker vs. lighter, but who is to say that, for example, green is a higher value than orange?

于 2009-01-30T23:13:11.893 に答える