ColorStringFormatter - DataDog/dd-sdk-android GitHub Wiki
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.
Inheritors
DefaultColorStringFormatter |
Functions
formatColorAndAlphaAsHexString
abstract fun formatColorAndAlphaAsHexString(color: Int, alpha: Int): String
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
Return
new color value as a HTML formatted hexadecimal String
Parameters
color | the color value (with or without alpha in the first 8 bits) |
alpha | the override alpha in a O…255 range |
formatColorAsHexString
abstract fun formatColorAsHexString(color: Int): String
Converts a color as an int to a standard web hexadecimal representation, as RGBA (e.g.: #A538AFFF).
Return
new color value as a HTML formatted hexadecimal String
Parameters
color | the color value (with or without alpha in the first 8 bits) |