fromArgb

fun fromArgb(name: String, argb: Int): DynamicColor

Create a DynamicColor from a hex code.

Result has no background; thus no support for increasing/decreasing contrast for a11y.

Parameters

name

The name of the dynamic color.

argb

The source color from which to extract the hue and chroma.