public class ColorUtils extends Object
| Constructor and Description |
|---|
ColorUtils() |
| Modifier and Type | Method and Description |
|---|---|
static OpenRGBColor[] |
copyAndReverse(OpenRGBColor[] colors)
Get a reverse copy from a given OpenRGBColor array
|
static OpenRGBColor[] |
generateRainbow(int size,
int start,
int end)
Generate an array of OpenRGBColor using HSV, see https://en.wikipedia.org/wiki/Hue#/media/File:Hsv-hues-cf-lch-hues.png
|
public static OpenRGBColor[] generateRainbow(int size, int start, int end)
hue angle color code color name 0° #FF0000 red 15° #FF4000 vermilion 30° #FF8000 orange 45° #FFBF00 golden yellow 60° #FFFF00 yellow 75° #BFFF00 yellowish green 90° #80FF00 yellowish green, chartreuse 105° #40FF00 leaf green 120° #00FF00 green 135° #00FF40 cobalt green 150° #00FF80 emerald green 165° #00FFBF turquoise green 180° #00FFFF turquoise blue 195° #00BFFF cerulean blue 210° #0080FF azure 225° #0040FF blue, cobalt blue 240° #0000FF blue 255° #4000FF hyacinth 270° #8000FF violet 285° #BF00FF purple 300° #FF00FF magenta 315° #FF00BF reddish purple 330° #FF0080 ruby red, crimson 345° #FF0040 carmine
size - palette sizestart - start color (0-360)end - end color (0-360)public static OpenRGBColor[] copyAndReverse(OpenRGBColor[] colors)
colors - the original arrayCopyright © 2021. All rights reserved.