ColorAsset

data class ColorAsset(val colorHex: String) : AdaptyCustomAsset

Defines a color asset using a HEX color string.

The alpha channel comes last: use #RRGGBB or #RRGGBBAA, not #AARRGGBB. The value is sent to the native SDK verbatim, so an alpha-first string is not rejected — it is silently read as RRGGBBAA and renders the wrong color.

Example:

AdaptyCustomAsset.ColorAsset("#FFAA00")     // opaque orange
AdaptyCustomAsset.ColorAsset("#FFAA0080") // same orange at 50% alpha

Parameters

colorHex

HEX color code, #RRGGBB or #RRGGBBAA (alpha last).

Constructors

Link copied to clipboard
constructor(colorHex: String)

Properties

Link copied to clipboard