toHex

fun toHex(includeAlpha: Boolean = alpha < 1f): String

Converts the color to a hex string.

Return

A hex string representation of the color.

Parameters

includeAlpha

Whether to include the alpha channel in the hex string.