Skip to content

DefaultColorStringFormatter

Xavier F. Gouchet edited this page Sep 4, 2024 · 1 revision

object DefaultColorStringFormatter : ColorStringFormatter

String utility methods needed in the Session Replay Wireframe Mappers. This class is meant for internal usage so please use it with careful as it might change in time.

Functions

formatColorAndAlphaAsHexString

open override 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

open override 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)
Clone this wiki locally