Class ColorFunctions


  • public class ColorFunctions
    extends Object
    Functions that modify colors.
    • Constructor Detail

      • ColorFunctions

        public ColorFunctions()
    • Method Detail

      • clamp

        public static float clamp​(float value)
      • mix

        public static Color mix​(Color color1,
                                Color color2,
                                float weight)
        Returns a color that is a mixture of two colors.
        Parameters:
        color1 - first color
        color2 - second color
        weight - the weight (in range 0-1) to mix the two colors. Larger weight uses more of first color, smaller weight more of second color.
        Returns:
        mixture of colors