toHexString

fun toHexString(isUsingAlpha: Boolean = false, argb: Boolean = false): String

Create a hex color string that CSS can use. Optionally, inhibit capturing alpha, because some uses reject a four-component color specification.

Parameters

isUsingAlpha

Enable the use of an alpha component.

argb

If true use #AARRGGBB sequence, otherwise use #RRGGBBAA