|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.sass.internal.util.ColorUtil
public class ColorUtil
| Constructor Summary | |
|---|---|
ColorUtil()
|
|
| Method Summary | |
|---|---|
static int[] |
colorToRgb(LexicalUnitImpl color)
Converts a color into an array of its RGB components. |
static LexicalUnitImpl |
darken(LexicalUnitImpl darkenFunc)
|
static boolean |
isColor(LexicalUnitImpl unit)
Returns true if the lexical unit represents a valid color (hexadecimal, rgb(), color name etc.), false otherwise. |
static boolean |
isColorName(LexicalUnitImpl unit)
Returns true if the lexical unit represents a valid color name, false otherwise. |
static boolean |
isHexColor(LexicalUnitImpl unit)
Returns true if the lexical unit represents a valid color in the hexadecimal form (three or six digits), false otherwise. |
static boolean |
isHexColor(String string)
Returns true if the string represents a valid color in the hexadecimal form (three or six digits), false otherwise. |
static boolean |
isHslColor(LexicalUnitImpl unit)
Returns true if the lexical unit represents a valid hsl() color function call, false otherwise. |
static boolean |
isRgba(LexicalUnitImpl unit)
Returns true if the lexical unit represents a valid RGBA value, false otherwise. |
static boolean |
isRgbFunction(LexicalUnitImpl unit)
Returns true if the lexical unit represents a valid rgb() method call , false otherwise. |
static LexicalUnitImpl |
lighten(LexicalUnitImpl lightenFunc)
|
static String |
rgbToColorString(int[] rgb)
Converts an array of RGB components to a string representing the color. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColorUtil()
| Method Detail |
|---|
public static boolean isColor(LexicalUnitImpl unit)
unit - lexical unit
public static boolean isRgbFunction(LexicalUnitImpl unit)
unit - lexical unit
public static boolean isRgba(LexicalUnitImpl unit)
unit - lexical unit
public static boolean isHexColor(LexicalUnitImpl unit)
unit - lexical unit
public static boolean isColorName(LexicalUnitImpl unit)
unit - lexical unit
public static boolean isHslColor(LexicalUnitImpl unit)
unit - lexical unit
public static int[] colorToRgb(LexicalUnitImpl color)
color - a lexical unit that represents a color
public static String rgbToColorString(int[] rgb)
rgb - the RGB components of a color
public static boolean isHexColor(String string)
string - string that might represent a hex color
public static LexicalUnitImpl darken(LexicalUnitImpl darkenFunc)
public static LexicalUnitImpl lighten(LexicalUnitImpl lightenFunc)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||