Conical (angular) gradient for iOS written in Swift

Overview

Swift 4.2 Platforms iOS CocoaPods Carthage Swift Package Manager License MIT

AEConicalGradient

Conical (angular) gradient in Swift

I hope that somebody will find this useful. And nice.

AEConicalGradient

Usage

AEConicalGradient is a minion which consists of two objects:

  • ConicalGradientLayer
    Subclass of CALayer which performs drawing of conical gradient. You can set colors, locations, start/end angle for the gradient. If no colors are set, default colors will be used. If no locations are set, colors will be equally distributed.

  • ConicalGradientView
    Subclass of UIView which uses ConicalGradientLayer as the view’s Core Animation layer. You can configure conical gradient options with gradient property.

Installation

License

AEConicalGradient is released under the MIT license. See LICENSE for details.

done for fun

You might also like...
A beautiful set of predefined colors and a set of color methods to make your iOS/OSX development life easier.
A beautiful set of predefined colors and a set of color methods to make your iOS/OSX development life easier.

Installation Drag the included Colours.h and Colours.m files into your project. They are located in the top-level directory. You can see a demo of how

An unintrusive & light-weight iOS app-theming library with support for animated theme switching.
An unintrusive & light-weight iOS app-theming library with support for animated theme switching.

Gestalt Gestalt is an unintrusive and light-weight framework for application theming with support for animated theme switching. Usage Let's say you wa

iOS app for Technex, IIT(BHU) Varanasi. This project is closed before completion. You can use this app for learning purpose. You can use this app as a templet of any event related app.
iOS app for Technex, IIT(BHU) Varanasi. This project is closed before completion. You can use this app for learning purpose. You can use this app as a templet of any event related app.

technex-ios iOS app for Technex, IIT(BHU) Varanasi. This project is closed before completion for some reasons. You can use this app for learning purpo

iTunes 11 Style Color Art Detection for iOS
iTunes 11 Style Color Art Detection for iOS

iTunes 11 Style Color Art Detection for iOS. Original implementation from Fred Leitz Port of ColorArt code from OS X to iOS. Usage #include ColorArt/

ChromaColorPicker - An intuitive HSB color picker built in Swift
ChromaColorPicker - An intuitive HSB color picker built in Swift

An intuitive HSB color picker built in Swift. Supports multiple selection handles and is customizable to your needs.

Yet another extension to manipulate colors easily in Swift and SwiftUI
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 •

Gradients  🌔 A curated collection of 180 splendid gradients made in swift
Gradients 🌔 A curated collection of 180 splendid gradients made in swift

Gradients 🌔 A curated collection of 180 splendid gradients made in swift 180 splendid Gradients inspired by itmeo/webgradients View all the gradients

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.

An attractive color generator for Swift. Ported from randomColor.js.
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

Comments
  • Support for offset angle

    Support for offset angle

    Could you add support for setting the starting angle for the GradientLayer?

    I got this to work by adding an offset to the angle property in drawRect before calling colorForAngle

    opened by davidmuzi 7
  • Kellyroach/tapgesture

    Kellyroach/tapgesture

    This pull request

    • Adds a tap gesture recognizer to the demo app so that whenever the user taps the screen, the user is welcomed with a new random conical gradient. This is the same behavior which was and still is available by rotating device twice, e.g. portrait -> landscape -> portrait .
    • Adds an AppIcon and LaunchImage to the demo app.
    • Fixes repo issue startAngle/endAngle Behavior https://github.com/tadija/AEConicalGradient/issues/3
    opened by kellyroach 1
  • startAngle/endAngle Behavior

    startAngle/endAngle Behavior

    I would expect the color at location 0.0 to begin at startAngle and the color at 1.0 to end at endAngle; however, it appears colors are unconditionally distributed from 0 to 2pi and startAngle/endAngle simply clip the drawing. For example,

    gradientView.gradient.colors = [UIColor.red, UIColor.yellow, UIColor.green] gradientView.gradient.startAngle = .pi gradientView.gradient.endAngle = 2 * .pi

    I would expect this to draw red-yellow-green across the top half of the view. However, it draws only yellow-green across the top half.

    opened by chulbert 1
  • Animatable Properties

    Animatable Properties

    The documentation in the code say that both colors and locations are supposed to be animatable, but I can't seem to get them to animate with a UIView animation or a CA Basic key path animator. If the docs are correct, how are you animating color transitions?

    opened by joeblau 3
Owner
Marko Tadić
keep it simple
Marko Tadić
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
UIGradient - A simple and powerful library for using gradient layer, image, color

UIGradient is now available on CocoaPods. Simply add the following to your project Podfile, and you'll be good to go.

Đinh Quang Hiếu 247 Dec 1, 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
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
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
ImagePalette - Swift/iOS port of Android's Palette

ImagePalette - Swift/iOS port of Android's Palette

Shaun Harrison 54 Sep 23, 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
SheetyColors is an action sheet styled color picker for iOS

?? Based on UIAlertController: The SheetyColors API is based on UIKit's UIAlertController. Simply add buttons to it as you would for any other Action Sheet by defining UIAlertAction instances. Therefore, it nicely integrates with the look & feel of all other native system dialogs. However, you can also chose to use the color picker it self without an action sheet.

Christoph Wendt 102 Nov 10, 2022
A tool to calculate the color ratio of UIImage in iOS.

UIImageColorRatio A tool to calculate the color ratio of UIImage in iOS. How to use UIImageColorRatio Get the color ratio of UIImage. let image = ...

Yanni Wang 王氩 34 Jan 1, 2023
Colour blindness simulation and testing for iOS

Color Deficiency Snapshot Tests This package makes it easier for you to understand the implications of your app's design on users with various types o

James Sherlock 69 Sep 29, 2022