public class TermColorImpl extends TermImpl<Color> implements TermColor
TermColor.KeywordTerm.Operator| Modifier and Type | Field and Description |
|---|---|
protected static String |
COLOR_HSL_NAME |
protected static String |
COLOR_HSLA_NAME |
protected static int |
COLOR_PARAMS_COUNT |
protected static String |
COLOR_RGB_NAME |
protected static String |
COLOR_RGBA_NAME |
protected static int |
MAX_HUE |
protected static int |
MAX_VALUE |
protected static int |
MIN_VALUE |
protected static int |
PERCENT_CONVERSION |
| Modifier | Constructor and Description |
|---|---|
protected |
TermColorImpl(int r,
int g,
int b) |
protected |
TermColorImpl(int r,
int g,
int b,
int a) |
| Modifier and Type | Method and Description |
|---|---|
static TermColor |
getColorByFunction(TermFunction func)
Creates color from
rgb() function. |
static TermColor |
getColorByHash(String hash)
Creates color from string in form #ABC or #AABBCC, or
just simply ABC and AABBCC.
|
static TermColor |
getColorByIdent(TermIdent ident)
Checks indent value against color card.
|
TermColor.Keyword |
getKeyword()
When the color was created using a special keyword such as 'transparent'
or 'currentColor', this method may be used to test this condition.
|
boolean |
isTransparent()
Checks whether the given color is entirely transparent.
|
String |
toString() |
equals, getOperator, getValue, hashCode, setOperator, setValue, shallowCloneclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetOperator, getValue, setOperator, setValue, shallowCloneprotected static final String COLOR_RGB_NAME
protected static final String COLOR_RGBA_NAME
protected static final String COLOR_HSL_NAME
protected static final String COLOR_HSLA_NAME
protected static final int COLOR_PARAMS_COUNT
protected static final int MAX_VALUE
protected static final int MIN_VALUE
protected static final int PERCENT_CONVERSION
protected static final int MAX_HUE
protected TermColorImpl(int r,
int g,
int b)
protected TermColorImpl(int r,
int g,
int b,
int a)
public TermColor.Keyword getKeyword()
TermColorgetKeyword in interface TermColorTermColor.Keyword valuepublic boolean isTransparent()
TermColorisTransparent in interface TermColortrue when the color is entirely transparentpublic static TermColor getColorByIdent(TermIdent ident)
ident - Identifier possibly holding color's nameTermColor if color matches, null elsewherepublic static TermColor getColorByHash(String hash)
hash - Hash stringnull in case of errorpublic static TermColor getColorByFunction(TermFunction func)
rgb() function.func - Function to be testednull otherwiseCopyright © 2019. All rights reserved.