Class ColorUtils

    • Method Detail

      • main

        public static void main​(String[] args)
      • rotateHue

        public static Color rotateHue​(Color color,
                                      float fraction)
        Rotate a color through HSB space
        Parameters:
        color - Starting color
        fraction - Amount to add to the hue. The integer part is discarded to leave a number in [0,1)
        Returns:
      • darker

        public static Color darker​(Color color,
                                   double fraction)
        Make a color darker. (RGB color scheme)
        Parameters:
        color - Color to make darker.
        fraction - Darkness fraction.
        Returns:
        Darker color.
      • lighter

        public static Color lighter​(Color color,
                                    double fraction)
        Make a color lighter. (RGB color scheme)
        Parameters:
        color - Color to make lighter.
        fraction - Darkness fraction.
        Returns:
        Lighter color.