asColor

fun String.asColor(colorLoader: KalugaColorLoader = DefaultColorLoader(), defaultValue: KalugaColor? = null): KalugaColor?

Treats this string as a resource identifier for a KalugaColor and grabs the associated KalugaColor

Return

The KalugaColor associated with the identifier represented by this String, or defaultValue if no such KalugaColor could be found.

Parameters

colorLoader

The KalugaColorLoader used for loading the associated KalugaColor resource.

defaultValue

The KalugaColor to return if no match was found for the identifier. Defaults to null.