Class ColorUtils


  • public class ColorUtils
    extends Object
    Color Utils provide some static convenience functions for Colors
    Author:
    Thomas Pfau
    • Constructor Detail

      • ColorUtils

        public ColorUtils()
    • Method Detail

      • getContrastingColor

        public static Color getContrastingColor​(Color origcolor)
        Obtain the contrasting black/white color for a original color. The grey value will be computed and white or black will be returned depending on its value.
        Parameters:
        origcolor - The original color
        Returns:
        The contrasting colo on a black/white scale