Enum FlatIconColors

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

    public enum FlatIconColors
    extends java.lang.Enum<FlatIconColors>
    Default color palette for action icons and object icons.

    The idea is to use only this well-defined set of colors in SVG icons, and then they are replaced at runtime to dark variants or to other theme colors. Then a single SVG icon (light variant) can be used for dark themes too. IntelliJ Platform uses this mechanism to allow themes to change IntelliJ Platform icons.

    Use the *_DARK colors only in *_dark.svg files.

    The colors are based on IntelliJ Platform Action icons and Noun icons

    These colors may be changed by IntelliJ Platform themes.

    You may use these colors also in your application (outside of SVG icons), but do not use the RGB values defined in this enum.
    Instead, use UIManager.getColor( FlatIconColors.ACTIONS_GREY.key ).

    • Field Detail

      • rgb

        public final int rgb
      • key

        public final java.lang.String key
      • light

        public final boolean light
      • dark

        public final boolean dark
    • Constructor Detail

      • FlatIconColors

        private FlatIconColors​(int rgb,
                               java.lang.String key)
      • FlatIconColors

        private FlatIconColors​(int rgb,
                               java.lang.String key,
                               boolean light,
                               boolean dark)
    • Method Detail

      • values

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

        public static FlatIconColors 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