Enum Color

    • Enum Constant Detail

      • BLUE

        public static final Color BLUE
      • LIGHT_BLUE

        public static final Color LIGHT_BLUE
      • GREEN

        public static final Color GREEN
      • PURPLE

        public static final Color PURPLE
      • RED

        public static final Color RED
      • YELLOW

        public static final Color YELLOW
      • DARK_RED

        public static final Color DARK_RED
      • LIGHT_GREEN

        public static final Color LIGHT_GREEN
      • ORANGE

        public static final Color ORANGE
      • DARK_BLUE

        public static final Color DARK_BLUE
    • Method Detail

      • values

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

        public static Color 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
      • fromName

        public static Color fromName​(String name)
        Get a color based on its name.
        Parameters:
        name - the name to find.
        Returns:
        the Colors or null if not found.
      • fromCode

        public static Color fromCode​(String code)
        Get a color based on its color code (either Word or Excel).
        Parameters:
        code - the code to find.
        Returns:
        the Colors or null if not found.
      • getName

        public String getName()
        Get the color's name.
        Returns:
        the name.
      • getExcelColorCode

        public String getExcelColorCode()
        Get the color's Excel Color Code.
        Returns:
        the Excel color code.
      • getWordColorCode

        public String getWordColorCode()
        Get the color's Word Color Code.
        Returns:
        the Excel color code.