Class ColorBuilder
- java.lang.Object
-
- org.pepstock.charba.client.colors.ColorBuilder
-
public final class ColorBuilder extends Object
Utility to create colors by red, green and blue values, HEX value and RGB and RGBA strings.
It checks if the requested color is already defined in HTML colors.- Author:
- Andrea "Stock" Stocchero
- See Also:
HtmlColor
,GwtMaterialColor
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IsColor
build(int r, int g, int b)
Creates a color using red, green and blue channels.static IsColor
parse(String value)
Returns a color parsing the string value passed as argument.
It's able to parse HEX, RGB, RGBA and named color representation.static List<IsColor>
parse(List<String> colorsAsString)
Builds a list of colors starting from a list of strings which represent colors.
-
-
-
Method Detail
-
parse
public static List<IsColor> parse(List<String> colorsAsString)
Builds a list of colors starting from a list of strings which represent colors.- Parameters:
colorsAsString
- list of strings which represent colors- Returns:
- a list of colors
-
build
public static IsColor build(int r, int g, int b)
Creates a color using red, green and blue channels.- Parameters:
r
- red channelg
- green channelb
- blue channel- Returns:
- a color instance
-
-