/** * Create a set of colours using a simple colour ramp algorithm in the HSB colour space. * * @param numColours number of colours required * * @return an array of colours sampled from the HSB space. */ public static Color[] createRampColours(int numColours) { return createRampColours(numColours, 0.8f, 0.8f); }
/** * Create a set of colours using a simple colour ramp algorithm in the HSB colour space. * * @param numColours number of colours required * * @param saturation the saturation of all colours (between 0 and 1) * * @param brightness the brightness of all colours (between 0 and 1) * * @return an array of colours sampled from the HSB space between the start and end hues */ public static Color[] createRampColours(int numColours, float saturation, float brightness) { return createRampColours(numColours, 0.0f, 1.0f, saturation, brightness); }