Contents

mix(with:by:in:)

Returns a version of self mixed with rhs by the amount specified by fraction.

Declaration

func mix(with rhs: Color, by fraction: Double, in colorSpace: Gradient.ColorSpace = .perceptual) -> Color

Parameters

  • rhs:

    The color to mix self with.

  • fraction:

    The amount of blending, 0.5 means self is mixed in equal parts with rhs.

  • colorSpace:

    The color space used to mix the colors.

Return Value

A new Color based on self and rhs.

See Also

Modifying a color