Enum AttributedCharSequence.ForceMode

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      Force256Colors
      Force indexed colors to use 256-color encoding (38;5;n) even when a basic SGR code would suffice.
      ForceTrueColors
      Force indexed colors to be expanded to true-color RGB (38;2;r;g;b) via the palette, but only when the terminal supports AttributedCharSequence.HIGH_COLORS.
      None
      No forcing; indexed colors are rendered using the best encoding for the terminal's reported color count (basic SGR 30-37/90-97, 256-color 38;5;n, or true-color 38;2;r;g;b).
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static AttributedCharSequence.ForceMode valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static AttributedCharSequence.ForceMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • None

        public static final AttributedCharSequence.ForceMode None
        No forcing; indexed colors are rendered using the best encoding for the terminal's reported color count (basic SGR 30-37/90-97, 256-color 38;5;n, or true-color 38;2;r;g;b).
      • Force256Colors

        public static final AttributedCharSequence.ForceMode Force256Colors
        Force indexed colors to use 256-color encoding (38;5;n) even when a basic SGR code would suffice.
      • ForceTrueColors

        public static final AttributedCharSequence.ForceMode ForceTrueColors
        Force indexed colors to be expanded to true-color RGB (38;2;r;g;b) via the palette, but only when the terminal supports AttributedCharSequence.HIGH_COLORS. This does not override the color count check for direct RGB values.
    • Method Detail

      • values

        public static AttributedCharSequence.ForceMode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (AttributedCharSequence.ForceMode c : AttributedCharSequence.ForceMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static AttributedCharSequence.ForceMode valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null