Interface Theme


@Experimental @AvailableSince("1.3") public interface Theme
Represents a color theme with semantic color roles.

Themes map ColorRoles to TextColors, allowing consistent theming across messages with semantic names like "accent", "primary", etc.

Since:
1.3
  • Method Summary

    Modifier and Type
    Method
    Description
    net.kyori.adventure.text.format.TextColor
    Gets the color for a specific role in this theme.
    Gets the displayName of this theme.
    net.kyori.adventure.text.minimessage.tag.resolver.TagResolver
    Gets the tag resolver for this theme.
  • Method Details

    • getColor

      @AvailableSince("1.3") net.kyori.adventure.text.format.TextColor getColor(ColorRole role)
      Gets the color for a specific role in this theme.
      Parameters:
      role - the color role
      Returns:
      the TextColor for this role
    • name

      @AvailableSince("1.3") String name()
      Gets the displayName of this theme.
      Returns:
      the theme displayName
    • resolver

      @AvailableSince("1.3") net.kyori.adventure.text.minimessage.tag.resolver.TagResolver resolver()
      Gets the tag resolver for this theme.

      The tag resolver contains all color role tags that can be used in MiniMessage strings with this theme.

      Returns:
      the TagResolver for this theme
      Since:
      1.3