Gradients πŸŒ” A curated collection of 180 splendid gradients made in swift

Overview

Gradients

πŸŒ” A curated collection of 180 splendid gradients made in swift

logo

Awesome Swift Version License Platform Carthage compatible

180 splendid Gradients inspired by itmeo/webgradients View all the gradients here Β»

πŸ„πŸΌ Easy To Use

view.layer.addSubLayer(Gradients.deepBlue.layer)

180+ Gradients

public enum Gradients: Int, CaseIterable {
    case warmFlame = 1
    case nightFade
    case springWarmth
    case juicyPeach
    //...
    case fabledSunset
    case perfectBlue
}

Direction

public enum Direction {
    case top
    case left
    case right
    case bottom
    case degree(CGFloat)
}

🎨 Customize

customize

// degree for radian direction supported
let customLayer = Gradients.linear(to: .degree(-225), colors: [0x231557, 0x44107A, 0xFF1361, 0xFFF800], locations: [0.0, 0.29, 0.67, 1.0]) // Fabled Sunset
view.layer.addSubLayer(customLayer)

Examples

  • Comets: β˜„οΈ Comets: Animating Particles in Swift.
  • DeliTodo: Todo application for iOS using Deli.

Requirements

Gradients is written in Xcode 10, Swift 4+, iOS 9.0+ Required

πŸ“² Installation

Gradients is available through Cocoapods or Carthage

Cocoapods

pod "Gradients"

Carthage

0.3.0 ">
github "cruisediary/Gradients" ~> 0.3.0

❀️ Contribution

Pull requests are always welcomed πŸ„πŸΌ

Awesome

  • awesome-swift - A collaborative list of awesome Swift libraries and resources. Feel free to contribute!
  • awesome-gradient - 🌈 A curated list of awesome Gradient frameworks, libraries and software and resources

πŸ‘¨β€πŸ’» Author

cruz, [email protected]

πŸ›‘ License

Gradients is available under the MIT license. See the LICENSE file for more info.

Comments
  • Added Swift Package Manager Support

    Added Swift Package Manager Support

    This adds support for SPM (#23)

    Please note that after merging this pull request, a new tag (0.3.1) is needed in order to provide full compatibility with SPM.

    opened by guidev 3
  • Swiftlint

    Swiftlint

    Swiftlint is handy for catching stuff like trailing whitespace and and other stylistic misses so I thought it might help to add in a .swiftlint.yml disabling some current warnings.

    opened by Nirma 2
  • radial and linear functions declaration into Gradients namespace

    radial and linear functions declaration into Gradients namespace

    Radial and linear function ( maybe upcoming functions in the future ) declarations should be wrapped by a namespace such as Gradients.

     Gradients.linear(to: .top, colors: [0xdf89b5, 0xbfd9fe], locations: [0.0, 1.0])
    

    Without a namespace these functions can be called only their name which is not intended.

    If we do not want to users create their own custom radial or linear layers, we could mark these methods as private.

    opened by muhasturk 2
  • Alpha assert is wrong

    Alpha assert is wrong

    Alpha value is must be between 0.0 and 1.0

    alpha
    The opacity value of the color object, specified as a value from 0.0 to 1.0. Alpha values below 0.0 are interpreted as 0.0, and values above 1.0 are interpreted as 1.0.
    
    opened by muhasturk 1
  • I can't set your gradient

    I can't set your gradient

    Hello ! I'm trying to set your gradient via viewdidappear, but it doesn't work

    ExampleOfCode: viewDidAppear(_ animated: Bool) { self.view.layer.addSublayer(Gradients.coupDeGrace.layer) }

    opened by IKorabel 1
  • "complex" gradients do not render

    Gradients such as "elegance", "raccoonBack", "aboveClouds", etc... do not produce a colour, whereas the more simple ones such as "purpleDivision", "aquaSplash", "warmFlame" etc... do produce a colour as expected. Any idea why?

    opened by 368433 3
Releases(0.3.1)
Owner
Gradients
πŸŒ” G R A D I E N T S
Gradients
Yet another extension to manipulate colors easily in Swift and SwiftUI

DynamicColor provides powerful methods to manipulate colors in an easy way in Swift and SwiftUI. Requirements β€’ Usage β€’ Installation β€’ Contribution β€’

Yannick Loriot 2.8k Dec 30, 2022
PrettyColors is a Swift library for styling and coloring text in the Terminal.

PrettyColors is a Swift library for styling and coloring text in the Terminal. The library outputs ANSI escape codes and conforms to ECMA Standard 48.

J.D. Healy 171 Aug 13, 2022
HEX color handling as an extension for UIColor. Written in Swift.

SwiftHEXColors HEX color handling as an extension for UIColor. Written in Swift.

Thi DoΓ£n 692 Dec 22, 2022
Color framework for Swift & Objective-C (Gradient colors, hexcode support, colors from images & more).

Swift 3 To use the Swift 3 version, add this to your Podfile (until 2.2 or higher is released): pod 'ChameleonFramework/Swift', :git => 'https://githu

Vicc Alexander 12.5k Dec 27, 2022
An attractive color generator for Swift. Ported from randomColor.js.

Random Color Swift Inspired by David Merfield's randomColor.js. It is a ported version to Swift. You can use the library to generate attractive random

Wei Wang 624 Jan 3, 2023
Flat UI color palette helpers written in Swift.

FlatUIColors (swift) install Make sure you have the latest version of CocoaPods (gem install cocoapods) that has Swift support. At the time of this wr

Bryn Bellomy 172 Dec 6, 2022
Conical (angular) gradient for iOS written in Swift

AEConicalGradient Conical (angular) gradient in Swift I hope that somebody will find this useful. And nice. Usage AEConicalGradient is a minion which

Marko Tadić 82 Dec 27, 2022
ImagePalette - Swift/iOS port of Android's Palette

ImagePalette - Swift/iOS port of Android's Palette

Shaun Harrison 54 Sep 23, 2022
Google Material Color Palette in Swift

Google Material Color in Swift Defined Google Material Color value ready to use in Swift refer to Google Material Design in Style/Color section ###How

Todsaporn Banjerdkit 48 Oct 30, 2019
A pure Swift library for using ANSI codes. Basically makes command-line coloring and styling very easy!

Colors A pure Swift library for using ANSI codes. Basically makes command-line coloring and styling very easy! Note: Colors master requires Xcode 7.3

Chad Scira 27 Jun 3, 2021
A Lightweight But Powerful Color Kit (Swift)

BCColor A lightweight but powerful color kit (Swift) Features Pick Colors From Image Generate Monochrome Image Support Hex Color Style Lighten / Darke

Xiaobo Zhang 418 Nov 25, 2022
Aesthetic color-scheme generation written in Swift

Lorikeet Lightweight framework for generating visually aesthetic color-schemes in Swift Requirements UIKit Features What can Lorikeet do for you Calcu

Þorvaldur Rúnarsson 31 Jun 21, 2022
A pure Swift library that allows you to easily convert SwiftUI Colors to Hex String and vice versa.

iOS Β· macOS Β· watchOS Β· tvOS A pure Swift library that allows you to easily convert SwiftUI Colors to Hex String and vice versa. There is also support

Novem 3 Nov 20, 2022
Tidy up your XCTests with swift

TestCleaner It makes your tests cleaner. Here is an existing XCTest that confirm

Zev Eisenberg 5 Feb 14, 2022
SwiftOpenColor - Swift port of OpenColor

Using Swift Package Manager, add it as a Swift Package in Xcode 11.0 or later

sam woolf 6 Apr 12, 2022
Powerful animated gradientView in swift 🌈

FancyGradient is a UIView subclass which let's you animate gradients in your iOS app. It is purely written in Swift. Quickstart Static gradient let fa

Konstantinos Nikoloutsos 62 Jul 14, 2022
An Adobe .ase (Adobe Swatch Exchange File), .aco (Photoshop swatch file) reader/writer package for Swift (macOS, iOS, tvOS, macCatalyst)

ColorPaletteCodable A palette reader/editor/writer package for iOS, macOS, watchOS and tvOS, supporting the following formats Adobe Swatch Exchange (.

Darren Ford 11 Nov 29, 2022
Create gradients and blur gradients without a single line of code

EZYGradientView is a different and unique take on creating gradients and gradients with blur on the iOS platform. The default CAGradientLayer implemen

Shashank Pali 380 Dec 6, 2022
A splendid route-matching, block-based way to handle your deep links.

DeepLink Kit Overview DeepLink Kit is a splendid route-matching, block-based way to handle your deep links. Rather than decide how to format your URLs

Button 3.4k Dec 30, 2022
🎈 Curated collection of advanced animations that I have developed using (Swift UI for iOS) and (React Native for iOS/Android). Source code is intended to be reused by myself for future projects.

?? Curated collection of advanced animations that I have developed using (Swift UI for iOS) and (React Native for iOS/Android). Source code is intended to be reused by myself for future projects.

Artem Moshnin 5 Apr 3, 2022