Enum ANSIBuilder.SemanticColor

java.lang.Object
java.lang.Enum<ANSIBuilder.SemanticColor>
org.aesh.terminal.utils.ANSIBuilder.SemanticColor
All Implemented Interfaces:
Serializable, Comparable<ANSIBuilder.SemanticColor>
Enclosing class:
ANSIBuilder

public static enum ANSIBuilder.SemanticColor extends Enum<ANSIBuilder.SemanticColor>
Semantic color categories used for theme-aware styling. Each entry stores a default ANSI code and a capability getter for resolving the theme-appropriate code at runtime.
  • Enum Constant Details

  • Method Details

    • values

      public static ANSIBuilder.SemanticColor[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ANSIBuilder.SemanticColor valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • defaultCode

      public int defaultCode()
      Returns the default ANSI color code for this semantic color.
      Returns:
      the default ANSI code
    • getFromCapability

      public int getFromCapability(TerminalColorCapability cap)
      Returns the suggested ANSI code from the given capability.
      Parameters:
      cap - the terminal color capability
      Returns:
      the suggested ANSI code