harmonize

fun Blend.harmonize(fromColor: Color, toColor: Color, matchSaturation: Boolean = false): Color

Blend the design color's HCT hue towards the key color's HCT hue, in a way that leaves the original color recognizable and recognizably shifted towards the key color.

If you want to adjust the saturation of fromColor to match the saturation of toColor, set matchSaturation to true.

Parameters

fromColor

Color to blend from.

toColor

Color to blend towards.

matchSaturation

Whether to match the saturation of the fromColor to the toColor.


fun Color.harmonize(other: Color, matchSaturation: Boolean = false): Color

Blend the color's HCT hue towards the other color's HCT hue, in a way that leaves the original color recognizable and recognizably shifted towards the key color.

If you want to adjust the saturation of Color to match the saturation of other, set matchSaturation to true.

Receiver

Color to blend from.

Return

Color blended color.

Parameters

other

Color to blend towards.

matchSaturation

Whether to match the saturation of the from to the toColor.