Object ColorHelper

  • All Implemented Interfaces:

    
    public class ColorHelper
    
                        

    Helper class used to do color related operations.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final String getOppositeColorString(String color) Compute a color from the contrast of the main access color (to ensure light on dark or dark on light)
      final Integer parseColor(String colorString) Parse a color, supporting 3-characters color strings
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • getOppositeColorString

         final String getOppositeColorString(String color)

        Compute a color from the contrast of the main access color (to ensure light on dark or dark on light)

        Parameters:
        color - the base color
      • parseColor

        @ColorInt() final Integer parseColor(String colorString)

        Parse a color, supporting 3-characters color strings

        Parameters:
        colorString - the color hex description, can be 3 or 6 characters