SmoothGradient

0.2.0

Generate buttery smooth gradients.
intitni/SmoothGradient

What's New

0.2.0

2021-05-08T14:05:09Z

Generate gradient from other color space colors.
Now you can create smooth gradients with colors from other color spaces like LCH.

SmoothGradient

License SPM

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.

This is a package strongly inspired by this gradient generator. You can click into the link to learn how this works.

Image

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.

Description

  • Swift Tools 5.3.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sat Oct 16 2021 10:09:57 GMT-0500 (GMT-05:00)