copy
fun Color.copy(red: Float? = null, green: Float? = null, blue: Float? = null, alpha: Float? = null): Color
Allows to copy this Color instance, optionally changing chosen properties.
Return
a new Color instance with values copied from this color and optionally overridden by the parameters.
Parameters
red
red color value. If null, will be copied from Color.r. Defaults to null.
green
green color value. If null, will be copied from Color.g. Defaults to null.
blue
blue color value. If null, will be copied from Color.b. Defaults to null.
alpha
color alpha value. If null, will be copied from Color.a. Defaults to null.