Class ColorFunctions


  • public class ColorFunctions
    extends java.lang.Object
    Functions that modify colors.
    • Constructor Summary

      Constructors 
      Constructor Description
      ColorFunctions()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.awt.Color applyFunctions​(java.awt.Color color, ColorFunctions.ColorFunction... functions)  
      static float clamp​(float value)  
      static java.awt.Color mix​(java.awt.Color color1, java.awt.Color color2, float weight)
      Returns a color that is a mixture of two colors.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ColorFunctions

        public ColorFunctions()
    • Method Detail

      • clamp

        public static float clamp​(float value)
      • mix

        public static java.awt.Color mix​(java.awt.Color color1,
                                         java.awt.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