@@ -0,0 +1,1083 @@
+package to.etc.domui.themes;%0A%0A/**%0A * Utility class to generate all kinds of colors.%0A *%0A * @author %3Ca href=%22mailto:jal@etc.to%22%3EFrits Jalvingh%3C/a%3E%0A * Created on Nov 20, 2012%0A */%0Apublic class CssColorGenerator %7B%0A%09private int m_index;%0A%0A%09static private final int COL_1 = 10;%0A%0A%09static private final int LUMD = 3;%0A%0A%09static private final int SATD = 3;%0A%0A%09public CssColor createColor() %7B%0A%09%09int c = m_index++;%0A%0A%09%09//-- We handle 10*color, 2 luminance levels (0.5, 1.0) and 2 saturation levels (0.5, 1.0) total of 40 colors @ the 1st ring%0A%09%09if(c %3C COL_1 * LUMD * SATD) %7B%0A%09%09%09double color = (c %25 COL_1) * (360.0/COL_1);%09%09%09%09%09// Color divider%0A%09%09%09int r = c / COL_1;%0A%0A%09%09%09double sat = 1.0 - (r %25 SATD) * (1.0 / SATD);%0A%09%09%09double lum = 1.0 - (r / SATD) * (1.0 / LUMD);%0A%0A%09%09%09System.out.println(%22color: %22 + color + %22, sat=%22 + sat + %22, lum=%22 + lum);%0A%0A%09%09%09return CssColor.createHSV(color, sat, lum);%0A%0A%09%09%09/*%0A%09%09%09 * 0..9:%09%09color, 1.0, 1.0;%0A%09%09%09 * 10..19:%09%09color, 0.5, 1.0%0A%09%09%09 * 20..29:%09%09color, 1.0, 0.5%0A%09%09%09 * 30..39:%09%09color, 0.5, 0.5%0A%09%09%09 */%0A%09%09%7D%0A%0A%09%09throw new IllegalStateException(%22Out of unique colors 8-/%22);%0A%09%7D%0A%0A%7D%0A

Add color generator.