【发布时间】:2018-05-31 05:30:24
【问题描述】:
我正在尝试使用 (runnable code here) 生成具有 15 种不同颜色的彩虹:
size(360,100);
colorMode(HSB, 360, 100, 100); // Hue in degrees in [0, 360],
// saturation/brightness in [0, 100]
// like in Photoshop
noStroke();
for (int i = 0; i < 15; i++)
{
fill(i*24, 100, 100); // 24*15 = 360
rect(i*24, 0, 25, 100);
}
但它不会产生丰富的 15 种彩虹色调色板,而是缺少一些颜色(例如鲜艳的黄色)。
是否有众所周知的算法可以生成生动的彩虹调色板?
【问题讨论】:
标签: colors processing rgb color-palette hsb