Blend

object Blend

Functions for blending in HCT and CAM16.

Functions

Link copied to clipboard
fun cam16Ucs(from: Int, to: Int, amount: Double): Int

Blend in CAM16-UCS space.

Link copied to clipboard
fun harmonize(designColor: Hct, sourceColor: Hct): Hct
fun harmonize(designColor: Int, sourceColor: Int): Int

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.

Link copied to clipboard
fun hctHue(from: Int, to: Int, amount: Double): Int

Blends hue from one color into another. The chroma and tone of the original color are maintained.