Package com.github.tommyettinger.textra
Class ColorLookup.GdxColorLookup
java.lang.Object
com.github.tommyettinger.textra.ColorLookup.GdxColorLookup
- All Implemented Interfaces:
ColorLookup
- Enclosing interface:
- ColorLookup
The default ColorLookup, this simply looks up
key in Colors, returning null if no Color exists by
that exact name (case-sensitive), or returning the RGBA8888 value of the color otherwise.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.tommyettinger.textra.ColorLookup
ColorLookup.GdxColorLookup -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ColorLookup.GdxColorLookupThe only way to access a GdxColorLookup. -
Method Summary
-
Field Details
-
INSTANCE
The only way to access a GdxColorLookup. Since this class has no state and exists only to implement an interface, it is fine that this is static.
-
-
Method Details
-
getRgba
Description copied from interface:ColorLookupUseskeyto look up an RGBA8888 color, and returns that color as an Integer if one was found, or returns null if none was found. This library will never call this method with a null key, and in most cases you can safely assume key is non-null.- Specified by:
getRgbain interfaceColorLookup- Parameters:
key- the String key to use to look up or build a color; should not be null.- Returns:
- an RGBA8888 color that may be null.
-