@Immutable public enum EColorPalette extends Enum<EColorPalette>
n
colors, a CSS color
property, and a style class for applying that color.Enum Constant and Description |
---|
MRMRS_COLORED
Color palette from https://github.com/mrmrs/colors.
|
QUASAR_COLORED_BALANCED
Quasar color palette, balanced so that they can be used as a text color on a white background and as a background
for white text.
|
Modifier and Type | Method and Description |
---|---|
IGuiColor |
getColor(int index) |
int |
getColorCount() |
com.google.common.collect.ImmutableList<IGuiColor> |
getColors() |
IGuiColor |
getRandom() |
IGuiColor |
getShuffledColor(int index) |
com.google.common.collect.ImmutableList<IGuiColor> |
getShuffledColors() |
boolean |
supportsField(IColorField<?> field)
Checks whether the given color palette field is support by the entries of this palette.
|
static EColorPalette |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EColorPalette[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EColorPalette MRMRS_COLORED
public static final EColorPalette QUASAR_COLORED_BALANCED
public static EColorPalette[] values()
for (EColorPalette c : EColorPalette.values()) System.out.println(c);
public static EColorPalette valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic IGuiColor getColor(int index)
index
- Index of the color.IndexOutOfBoundsException
is thrown.public int getColorCount()
public com.google.common.collect.ImmutableList<IGuiColor> getColors()
public IGuiColor getRandom()
public IGuiColor getShuffledColor(int index)
index
- Index of the color.IndexOutOfBoundsException
is thrown. The colors are shuffled, in a random order determined at startup.public com.google.common.collect.ImmutableList<IGuiColor> getShuffledColors()
public boolean supportsField(IColorField<?> field)
false
for a certain IColorField
, IGuiColor.getField(IColorField)
will throw an exception
when called with that field. Otherwise, when this returns true
, a value is available for all
getColors()
of this palette.field
- A field to check.Copyright © 2021 XIMA MEDIA GmbH. All rights reserved.