public class Colors extends Object
Constructor and Description |
---|
Colors() |
Modifier and Type | Method and Description |
---|---|
static HSLColor |
hsl(int h,
double s,
double l)
Constructs a new HSL color with the specified hue h, saturation s and
lightness l.
|
static HSLColor |
hsl(RGBColor color)
Constructs a new HSL color from an existing color object.
|
static HSLColor |
hsl(String color)
Constructs a new HSL color by parsing the specified color string.
|
static RGBColor |
rgb(Color color)
Construct a new RGB color from the existing color object.
|
static RGBColor |
rgb(int r,
int g,
int b)
Constructs a new RGB color with the specified r, g and b channel values.
|
static RGBColor |
rgb(String color)
Constructs a new RGB color by parsing the specified color string.
|
public static final RGBColor rgb(int r, int g, int b)
r
- the red channelg
- the green channelb
- the blue channelpublic static final RGBColor rgb(String color)
color
- the color string representationpublic static final RGBColor rgb(Color color)
color
- the existing color objectpublic static final HSLColor hsl(int h, double s, double l)
h
- the hue channel [0;360]s
- the saturation channel [0;1]l
- the light channel [0;1]public static final HSLColor hsl(String color)
color
- the color string representationCopyright © 2015 gwt-d3. All rights reserved.