com.ibm.tivoli.maximo.miniapps.scheduler.util

Class ColorUtil

  • java.lang.Object
    • com.ibm.tivoli.maximo.miniapps.scheduler.util.ColorUtil


  • public class ColorUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor and Description
      ColorUtil() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String toColor(java.lang.String color)
      Ensures that the color is in #RRGGBB format (will add the # if missing)
      static java.lang.String toComplimentColor(java.lang.String in)
      Color should be in the format #RRGGBB and returns it in the same format
      static java.lang.String toDarkerColor(java.lang.String in)
      Color should be in the format #RRGGBB and returns it in the same format
      static java.lang.String toDarkerColor(java.lang.String in, int weight)
      Color should be in the format #RRGGBB and returns it in the same format
      static java.lang.String toLighterColor(java.lang.String in)
      Color should be in the format #RRGGBB and returns it in the same format
      static java.lang.String toReadableColor(java.lang.String in)
      returns black or white depending on if the background is light or dark
      static java.lang.String toRGBACSS(java.lang.String in, float alpha)
      Converts a color from #RRGGBB to "rgba(rr,gg,bb,aa)"
      • Methods inherited from class java.lang.Object

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

      • ColorUtil

        public ColorUtil()
    • Method Detail

      • toComplimentColor

        public static java.lang.String toComplimentColor(java.lang.String in)
        Color should be in the format #RRGGBB and returns it in the same format
        Parameters:
        in -
        Returns:
      • toDarkerColor

        public static java.lang.String toDarkerColor(java.lang.String in,
                                                     int weight)
        Color should be in the format #RRGGBB and returns it in the same format
        Parameters:
        in -
        weight - the higher the weight the darker the color
        Returns:
      • toDarkerColor

        public static java.lang.String toDarkerColor(java.lang.String in)
        Color should be in the format #RRGGBB and returns it in the same format
        Parameters:
        in -
        Returns:
      • toLighterColor

        public static java.lang.String toLighterColor(java.lang.String in)
        Color should be in the format #RRGGBB and returns it in the same format
        Parameters:
        in -
        Returns:
      • toReadableColor

        public static java.lang.String toReadableColor(java.lang.String in)
        returns black or white depending on if the background is light or dark
        Parameters:
        in -
        Returns:
      • toColor

        public static java.lang.String toColor(java.lang.String color)
        Ensures that the color is in #RRGGBB format (will add the # if missing)
        Parameters:
        color -
        Returns:
      • toRGBACSS

        public static java.lang.String toRGBACSS(java.lang.String in,
                                                 float alpha)
        Converts a color from #RRGGBB to "rgba(rr,gg,bb,aa)"
        Parameters:
        in - Color
        alpha - transparency from 0-1
        Returns: