Enum Class SkinColor

java.lang.Object
java.lang.Enum<SkinColor>
games.stendhal.common.constants.SkinColor
All Implemented Interfaces:
Serializable, Comparable<SkinColor>, Constable

public enum SkinColor extends Enum<SkinColor>
Acceptable colors that can be used for skin.
Author:
AntumDeluge, kiheru
  • Enum Constant Details

    • COLOR1

      public static final SkinColor COLOR1
    • COLOR2

      public static final SkinColor COLOR2
    • COLOR3

      public static final SkinColor COLOR3
    • COLOR4

      public static final SkinColor COLOR4
    • COLOR5

      public static final SkinColor COLOR5
    • COLOR6

      public static final SkinColor COLOR6
    • COLOR7

      public static final SkinColor COLOR7
    • COLOR8

      public static final SkinColor COLOR8
    • COLOR9

      public static final SkinColor COLOR9
    • COLOR10

      public static final SkinColor COLOR10
    • COLOR11

      public static final SkinColor COLOR11
    • COLOR12

      public static final SkinColor COLOR12
    • COLOR13

      public static final SkinColor COLOR13
    • COLOR14

      public static final SkinColor COLOR14
    • COLOR15

      public static final SkinColor COLOR15
    • COLOR16

      public static final SkinColor COLOR16
  • Field Details

  • Method Details

    • values

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

      public static SkinColor valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromInteger

      public static SkinColor fromInteger(int color)
      Find the nearest skin color corresponding to an integer color value. The lookup is done based on the hue and saturation, ignoring lightness.
      Parameters:
      color - color as RGB int
      Returns:
      skin color corresponding to the integer value
    • getColor

      public int getColor()
      Get the corresponding color RGB.
      Returns:
      color
    • isValidColor

      public static boolean isValidColor(int color)
      Check if an integer color corresponds to a valid skin color.
      Parameters:
      color - color to be checked
      Returns:
      true if the color is a valid skin color, otherwise false