blendHue

fun Blend.blendHue(from: Color, to: Color, amount: Float): Color

Blends the hue of one color into another while maintaining the original chroma and tone.

This function computes a color that has the hue blended from the from color towards the to color. The chroma and tone of the original color remain unchanged. The blending amount determines how much of the to color's hue is mixed with the from color's hue.

Return

The resulting Color with the hue of from blended towards to, while chroma and tone remain constant.

Parameters

from

The Color to blend the hue from.

to

The Color to blend the hue to.

amount

The proportion of hue blending; a value between 0.0 (fully from hue) and 1.0 (fully to hue).


fun Color.blendHue(to: Color, amount: Float = 0.5f): Color

Blends the hue of this Color into another color while maintaining the original chroma and tone.

This extension function computes a color that has the hue of the receiver color blended into the to color. The chroma and tone of the receiver color remain unchanged. The blending amount determines how much of the to color's hue is mixed with the receiver color's hue.

Return

The resulting Color with the hue of the receiver color blended towards to, while chroma and tone remain constant.

Parameters

to

The Color to blend the hue to.

amount

The proportion of hue blending; a value between 0.0 (fully receiver hue) and 1.0 (fully to hue).