Modifier and Type | Field and Description |
---|---|
static Float[] |
BLACK
Black colour as RGB
|
static Float[] |
BLUE
Blue colour as RGB
|
static Float[] |
CYAN
Cyan colour as RGB
|
static Float[] |
DARK_GRAY
Dark gray colour as RGB
|
static Float[] |
GRAY
Gray colour as RGB
|
static Float[] |
GREEN
Green colour as RGB
|
static Float[] |
LIGHT_GRAY
Light gray colour as RGB
|
static Float[] |
MAGENTA
Magenta colour as RGB
|
static Float[] |
ORANGE
Orange colour as RGB
|
static Float[] |
PINK
Pink colour as RGB
|
static Float[] |
RED
Red colour as RGB
|
static Float[] |
WHITE
White colour as RGB
|
static Float[] |
YELLOW
Yellow colour as RGB
|
Modifier and Type | Method and Description |
---|---|
static Float[][] |
coloursFromMap(ColourMap cm,
int n)
Generate a range of colours from a
ColourMap . |
static Float[] |
fromColor(Color c)
Make an OpenImaj colour from a java.awt.Color.
|
static Float[] |
fromString(String s)
Get a colour from a string representation.
|
static Float[] |
randomColour()
Generate a random colour
|
static List<Float[]> |
randomColours(int n)
Generate a list of random colours.
|
static Float[] |
RGB(float r,
float g,
float b)
Create a colour from an RGB triplet with float values in the range 0..1.
|
static Float[] |
RGB(int r,
int g,
int b)
Create a colour from an RGB triplet with integer values in the range
0..255.
|
public static final Float[] LIGHT_GRAY
public static Float[] fromColor(Color c)
c
- the color to convertpublic static Float[] fromString(String s)
s
- the stringpublic static Float[] randomColour()
public static List<Float[]> randomColours(int n)
n
- number of colourspublic static Float[][] coloursFromMap(ColourMap cm, int n)
ColourMap
.cm
- the mapn
- number of colourspublic static Float[] RGB(int r, int g, int b)
r
- red value 0..255g
- green value 0..255b
- blue value 0..255