Class NamedTextColor
java.lang.Object
net.kyori.adventure.text.format.NamedTextColor
- All Implemented Interfaces:
Comparable<TextColor>, ComponentBuilderApplicable, StyleBuilderApplicable, TextColor, TextFormat, RGBLike
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NamedTextColorThe standardaquacolour.static final NamedTextColorThe standardblackcolour.static final NamedTextColorThe standardbluecolour.static final NamedTextColorThe standarddark_aquacolour.static final NamedTextColorThe standarddark_bluecolour.static final NamedTextColorThe standarddark_graycolour.static final NamedTextColorThe standarddark_greencolour.static final NamedTextColorThe standarddark_purplecolour.static final NamedTextColorThe standarddark_redcolour.static final NamedTextColorThe standardgoldcolour.static final NamedTextColorThe standardgraycolour.static final NamedTextColorThe standardgreencolour.static final NamedTextColorThe standardlight_purplecolour.static final Index<String, NamedTextColor> An index of name to color.static final NamedTextColorThe standardredcolour.static final NamedTextColorThe standardwhitecolour.static final NamedTextColorThe standardyellowcolour.Fields inherited from interface TextColor
HEX_CHARACTER, HEX_PREFIX -
Method Summary
Modifier and TypeMethodDescriptionasHSV()Converts the color represented by this RGBLike to the HSV color space.name()The name of this named text color.static @Nullable NamedTextColornamedColor(int value) Gets the named color exactly matching the provided color.static NamedTextColorFind the named colour nearest to the provided colour.toString()intvalue()The color, as an RGB value packed into an int.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface StyleBuilderApplicable
componentBuilderApplyMethods inherited from interface TextColor
asHexString, blue, compareTo, green, red, styleApply
-
Field Details
-
BLACK
-
DARK_BLUE
-
DARK_GREEN
-
DARK_AQUA
-
DARK_RED
-
DARK_PURPLE
-
GOLD
-
GRAY
-
DARK_GRAY
-
BLUE
-
GREEN
-
AQUA
-
RED
-
LIGHT_PURPLE
-
YELLOW
-
WHITE
-
NAMES
-
-
Method Details
-
namedColor
Gets the named color exactly matching the provided color.- Parameters:
value- the color to match- Returns:
- the matched color, or null
- Since:
- 4.10.0
-
nearestTo
Find the named colour nearest to the provided colour.- Parameters:
any- colour to match- Returns:
- nearest named colour. will always return a value
- Since:
- 4.0.0
-
name
-
value
-
asHSV
-
toString
-