public class ColorValidator extends Object
Constructor and Description |
---|
ColorValidator() |
Modifier and Type | Method and Description |
---|---|
boolean |
isLongMode(String toCheck)
Check if the color text is written in the long form with alpha.
|
boolean |
isLongModeWithoutAlpha(String toCheck)
Check if the color text is written in the long form without alpha.
|
boolean |
isShortMode(String toCheck)
Check if the color text is written in the short form with alpha.
|
boolean |
isShortModeWithoutAlpha(String toCheck)
Check if the color text is written in the short form without alpha.
|
boolean |
isValid(String toCheck)
Check if a string fits any type of color definition string.
|
public boolean isValid(String toCheck)
toCheck
- the text to checktrue
in case the text is a color definitionpublic boolean isShortMode(String toCheck)
#rgba
toCheck
- the text to checktrue
in case the text is a short form color definition
with alphapublic boolean isShortModeWithoutAlpha(String toCheck)
#rgb
toCheck
- the text to checktrue
in case the text is a short form color definition
without alphapublic boolean isLongMode(String toCheck)
#rrggbbaa
toCheck
- the text to checktrue
in case the text is a long form color definition
with alphapublic boolean isLongModeWithoutAlpha(String toCheck)
#rrggbb
toCheck
- the text to checktrue
in case the text is a long form color definition
without alphaCopyright © 2013. All Rights Reserved.