Package 

Interface ColorStringFormatter


  • 
    public interface ColorStringFormatter
    
                        

    A utility interface to convert Android/JVM colors to web hexadecimal strings. This interface is meant for internal usage, please use it carefully.

    • Method Summary

      Modifier and Type Method Description
      abstract String formatColorAsHexString(Integer color) Converts a color as an int to a standard web hexadecimal representation, as RGBA (e.g.: #A538AFFF).
      abstract String formatColorAndAlphaAsHexString(Integer color, Integer alpha) Converts a color as an int to a standard web hexadecimal representation, as RGBA (e.g.: #A538AFFF).
      • Methods inherited from class java.lang.Object

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

      • formatColorAsHexString

         abstract String formatColorAsHexString(Integer color)

        Converts a color as an int to a standard web hexadecimal representation, as RGBA (e.g.: #A538AFFF).

        Parameters:
        color - the color value (with or without alpha in the first 8 bits)
      • formatColorAndAlphaAsHexString

         abstract String formatColorAndAlphaAsHexString(Integer color, Integer alpha)

        Converts a color as an int to a standard web hexadecimal representation, as RGBA (e.g.: #A538AFFF). If also overrides the color's alpha channel

        Parameters:
        color - the color value (with or without alpha in the first 8 bits)
        alpha - the override alpha in a O…255 range