Enum Hue

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Hue>

    public enum Hue
    extends java.lang.Enum<Hue>

    Colors (besides black and white) are taken from the Tailwind CSS Color Palette.

    Not indented to be constructed directly in the public API. Internally, it's only use is getColor(String)

    Hue Variants
    VariantColor
    Black
    White
    Slate
    Gray
    Zinc
    Neutral
    Stone
    Red
    Orange
    Amber
    Yellow
    Lime
    Green
    Emerald
    Teal
    Cyan
    Sky
    Blue
    Indigo
    Purple
    Fuchsia
    Pink
    Rose
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int hex  
      java.lang.String name  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Color getColor()
      Get the associated Color for this Hue.
      static java.awt.Color getColor​(java.lang.String name)
      Get the associated Color when given a String as the name of the color.
      static Hue valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Hue[] 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

      • Black

        public static final Hue Black
      • White

        public static final Hue White
      • Slate

        public static final Hue Slate
      • Gray

        public static final Hue Gray
      • Zinc

        public static final Hue Zinc
      • Neutral

        public static final Hue Neutral
      • Stone

        public static final Hue Stone
      • Red

        public static final Hue Red
      • Orange

        public static final Hue Orange
      • Amber

        public static final Hue Amber
      • Yellow

        public static final Hue Yellow
      • Lime

        public static final Hue Lime
      • Green

        public static final Hue Green
      • Emerald

        public static final Hue Emerald
      • Teal

        public static final Hue Teal
      • Cyan

        public static final Hue Cyan
      • Sky

        public static final Hue Sky
      • Blue

        public static final Hue Blue
      • Indigo

        public static final Hue Indigo
      • Purple

        public static final Hue Purple
      • Fuchsia

        public static final Hue Fuchsia
      • Pink

        public static final Hue Pink
      • Rose

        public static final Hue Rose
    • Field Detail

      • name

        public final java.lang.String name
      • hex

        public final int hex
    • Method Detail

      • values

        public static Hue[] 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 (Hue c : Hue.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Hue 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
      • getColor

        public static java.awt.Color getColor​(java.lang.String name)
        Get the associated Color when given a String as the name of the color.
        Parameters:
        name - The name of the color (case-insensitive)
        Returns:
        The color
        Throws:
        java.lang.IllegalArgumentException - If the color does not exist
      • getColor

        public java.awt.Color getColor()
        Get the associated Color for this Hue.
        Returns:
        The color