Contents

intitni/smoothgradient

SmoothGradient helps you generate beautiful and buttery-smooth gradients. It helps you avoid gray dead zones in the middle of your gradients by interpolating colors in color spaces other than RGB.

Usage

let colors: [UIColor] = SmoothGradientGenerator()
    .generate(
        from: fromColor,
        to: toColor,
        interpolation: .hcl, // choose from hcl, hsl, hsb
        precision: .high
    )

Please check example playgrounds for more detail.

Installation

Swift Package Manager

Simply add https://github.com/intitni/SmoothGradient as a dependency in either Xcode or Package.swift.

License

MIT.

Package Metadata

Repository: intitni/smoothgradient

Default branch: main

README: README.md