Class ExtendedColor

    • Field Detail

      • TYPE_SEPARATION

        public static final int TYPE_SEPARATION
        a type of extended color.
        See Also:
        Constant Field Values
      • TYPE_PATTERN

        public static final int TYPE_PATTERN
        a type of extended color.
        See Also:
        Constant Field Values
      • TYPE_SHADING

        public static final int TYPE_SHADING
        a type of extended color.
        See Also:
        Constant Field Values
      • MAX_COLOR_VALUE

        public static final int MAX_COLOR_VALUE
        the max int color value (255) expressed in int
        See Also:
        Constant Field Values
      • MAX_INT_COLOR_VALUE

        public static final float MAX_INT_COLOR_VALUE
        the max int color value (255) expressed in float
        See Also:
        Constant Field Values
      • MAX_FLOAT_COLOR_VALUE

        public static final float MAX_FLOAT_COLOR_VALUE
        the max float color value (1) expressed in float
        See Also:
        Constant Field Values
      • type

        protected int type
    • Constructor Detail

      • ExtendedColor

        public ExtendedColor​(int type)
        Constructs an extended color of a certain type.
        Parameters:
        type - type
      • ExtendedColor

        public ExtendedColor​(int type,
                             float red,
                             float green,
                             float blue)
        Constructs an extended color of a certain type and a certain color.
        Parameters:
        type - type
        red - red quotient
        green - green quotient
        blue - blue quotient
      • ExtendedColor

        public ExtendedColor​(int type,
                             float red,
                             float green,
                             float blue,
                             float alpha)
        Constructs an extended color of a certain type and a certain color.
        Parameters:
        type - type
        red - red quotient
        green - green quotient
        blue - blue quotient
        alpha - alpha quotient
    • Method Detail

      • getType

        public static int getType​(Color color)
        Gets the type of a given color.
        Parameters:
        color - an object of Color
        Returns:
        one of the types (see constants)
      • getType

        public int getType()
        Gets the type of this color.
        Returns:
        one of the types (see constants)