ComplimentaryGradientView
Create complementary gradients generated from dominant and prominent colors in supplied image. Inspired by Grade.js
Install / Use
/learn @gkye/ComplimentaryGradientViewREADME
ComplimentaryGradientView
Create complementary gradients generated from dominant and prominent colors in supplied image. Inspired by <a href="https://github.com/benhowdle89/grade"> Grade.js </a>:heart:
.all<br>gradientStartPoint: left | colors(start: .primary, end: .background)<br>gradientStartPoint:top
:-------------------------:|:-------------------------:
| 
colors(start: .detail, end: .background)<br>gradientStartPoint:top |
colors(start: .secondary, end: .background)<br>gradientStartPoint:bottom
:-------------------------:|:-------------------------:
| 
Demo
Sorry for the poor quality gif

Usage
Code
let gradientView = ComplimentaryGradientView(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
//Colors for gradient are derived from the provided image
gradientView.image = UIImage(named: "myImg")
gradientView.gradientTpye = .colors(start: .primary, end: .secondary)
// Default = `.left`
gradientView.gradientStartPoint = .left
// Default = `.high`
gradientView.quality = .high
Storyboard

Migration Guide.
Version 3.0 introduces GradientVariant and reduces GradientType to two simple options:
// Create a gradient using all colors found in image
case all
// Create gradient using variants. ie. .colors(start: .primary, end: .detail)
case colors(start: GradientVariant, end: GradientVariant)
Installation
CocoaPods
ComplimentaryGradientView is available through CocoaPods. To install it, simply add the following line to your Podfile:
Swift 4.2
pod 'ComplimentaryGradientView', '~> 3.0'
Swift3.
pod 'ComplimentaryGradientView', '~> 0.1.7'
Swift 2.2
pod 'ComplimentaryGradientView', '~> 0.1.0'
Manually
Download and drop ComplimentaryGradientView.xcodeproj into your project
<b>OR</b>
Drag Source folder into your project.
Dependencies
<a href="https://github.com/jathu/UIImageColors" > UIImageColors <a/>
License
ComplimentaryGradientView is available under the MIT license. See the LICENSE file for more info.
Related Skills
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
