harmonize

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

Blends the hue of the fromColor towards the hue of the toColor, while keeping the original color recognizable and shifted towards the target color.

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

Return

The Color resulting from the blend.

Parameters

fromColor

The Color to blend from.

toColor

The Color to blend towards.

matchSaturation

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


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

Blends the hue of this Color towards the hue of the specified other color, while keeping the original color recognizable and shifted towards the target color.

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

Receiver

The Color to blend from.

Return

The Color resulting from the blend.

Parameters

other

The Color to blend towards.

matchSaturation

Whether to adjust the saturation of this color to match that of other.