本文介绍了我怎样才能生成的线路图颜色(未知号)的总体美观的范围内,从一个基础的色彩?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢的颜色随机生成算法<一href="http://stackoverflow.com/questions/43044/algorithm-to-randomly-generate-an-aesthetically-pleasing-color-palette?answertab=votes#tab-top">proposed这里由大卫·克罗,但我不知道是否有一种方法可以集中在一个单一的色彩效果和调节的结果。

I like the random color generation algorithm proposed here by David Crow, but I wonder if there's a way to focus its results around a single color and regulate the results.

我的节目将被产生跟踪多个变量曲线图。每个变量属于7类别之一。我想生成线颜色为这些变量都清晰可辨,独特,为其色调,饱和度和亮度分别是:在他们的类别相关联根颜色的邻近范围之内。例如,类红色的变数将是对红色的各种清晰可辨的变化。

My program will be generating graphs that track a number of variables. Each variable belongs to one of 7 categories. I'd like to generate line-colors for these variables that are legible, unique and for which the hue, saturation and luminosity are within a proximate range of a root color which is associated with their category. For example, category Red's variables would be various legible and discernible variations on red.

的一个解决方案可能是声明一个根色,以及用于色调,饱和度和亮度的上限和下限。然后,我可以随机从这些范围内拉值,但有没有更好的方法这三个维度内的跳房子,这样所产生的颜色有变化体面的数额,但仍留下的成长空间?例如,假设每个管道是一个范围值和每行是一个迭代:

One solution might be to declare a root color, plus upper and lower boundaries for hue, saturation and luminosity. I could then randomly pull values from within those ranges, but is there a better way to hopscotch within those three dimensions so that the resulting colors have a decent amount of variation, but still leaving space to grow? For example, assume each pipe is a range value and each line is an iteration:

01 > |---------------|---------------|
02 > |-------|-------|---------------|
03 > |-------|-------|-------|-------|
04 > |---|---|-------|-------|-------|
05 > |---|---|---|---|-------|-------|
06 > |---|---|---|---|---|---|-------|
07 > |---|---|---|---|---|---|---|---|
08 > |-|-|---|---|---|---|---|---|---|
09 > |-|-|-|-|---|---|---|---|---|---|
10 > |-|-|-|-|-|-|---|---|---|---|---|
11 > |-|-|-|-|-|-|-|-|---|---|---|---|
12 > |-|-|-|-|-|-|-|-|-|-|---|---|---|
13 > |-|-|-|-|-|-|-|-|-|-|-|-|---|---|
14 > |-|-|-|-|-|-|-|-|-|-|-|-|-|-|---|
15 > |-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|

什么是做到这一点的最好方法是什么?或者,这是再好的我的问题的解决方案?单个图形可能不积超过4或5个变量,但是其中可以绘制可以是在数百变量数。

What's the best way to do this? Or is this even the best solution to my problem? A single graph may not plot more than 4 or 5 variables, but the number of variables which can be plotted could be in the hundreds.

感谢您的帮助。

推荐答案

您可以看一下这是一个球在3D分装的问题:你希望你的颜色相互一致的距离。对于这一点,最好布置取决于你需要变体的颜色的数量,并找到一个最佳的解决方案不是简单。但是,简单的机制可能是节省面心立方坐标的序列,起始于(0,0,0),并从该原点下令距离,并用它们在序列作为偏移您的基地颜色(通过参数其中规定的如何的彼此,他们应该看看)不同。

You can look at this as a sphere-packing problem in 3D: you want your colors a uniform distance from each other. The best arrangement for this depends on the number of variant colors you need, and finding an optimal solution is not simple. However, a simple mechanism might be to save a sequence of face-centered-cubic coordinates, starting at (0,0,0) and ordered by distance from this origin, and use them in sequence as offsets to your "base" color (scaled by a parameter which sets how different from each other they should look).

如果您愿意支付最大的注意细节,注意研究人员在色彩理论和感知已经测量的最小可辨别色差,在整个可见的色域。您可以使用此数据来调节颜色偏移向量(使用矩阵乘法,代替上述简单的缩放),以确保您的颜色差异看起来是一样的。

If you want to pay maximal attention to detail, note that researchers in color theory and perception have measured the minimum discernible color difference, across the visible gamut. You can use this data adjust your color offset vector (using matrix multiplication, in lieu of the above-mentioned simple scaling), to ensure that your color differences look the same.

这篇关于我怎样才能生成的线路图颜色(未知号)的总体美观的范围内,从一个基础的色彩?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-21 03:57