All Projects → jathu → Uiimagecolors

jathu / Uiimagecolors

Licence: mit
Fetches the most dominant and prominent colors from an image.

Programming Languages

swift
15916 projects
objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Uiimagecolors

UIImageColorRatio
A tool to calculate the color ratio of UIImage in iOS.
Stars: ✭ 34 (-98.88%)
Mutual labels:  uiimage, uicolor
Swiftgen
The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs!
Stars: ✭ 7,580 (+150.41%)
Mutual labels:  uiimage, uicolor
summertunes
A web-based music player for Beets
Stars: ✭ 15 (-99.5%)
Mutual labels:  itunes
color-tunes
A HTML5 version of the iTunes 12 album view using Javascript and CSS3.
Stars: ✭ 15 (-99.5%)
Mutual labels:  itunes
product-release-notes
Release notes page for your product that follows iTunes and Google Play
Stars: ✭ 24 (-99.21%)
Mutual labels:  itunes
Leon
Leon is swift library to show and slid images with more gesture
Stars: ✭ 16 (-99.47%)
Mutual labels:  uiimage
iTunes-Discord-RP
iTunes Rich Presence for Discord made in Java (for MacOS and Windows)
Stars: ✭ 173 (-94.28%)
Mutual labels:  itunes
Hola
Light-weight Onboard/Walkthrough UIView/UIImage representer ⏪ & ⏩ ⏫ & ⏬
Stars: ✭ 40 (-98.68%)
Mutual labels:  uiimage
Storage
An iOS library for fast, easy, and safe threaded disk I/O.
Stars: ✭ 259 (-91.44%)
Mutual labels:  uiimage
autotagger
Tag .mp3 and .m4a audio files from iTunes data automatically.
Stars: ✭ 25 (-99.17%)
Mutual labels:  itunes
ChopChop
Chop an image to as many quadrants as you like at compile time. Great for dynamic content, suitable for games and image processing. Image matrix
Stars: ✭ 14 (-99.54%)
Mutual labels:  uiimage
owntone-server
OwnTone is forked-daapd's new name. Linux/FreeBSD DAAP (iTunes) and MPD media server with support for AirPlay devices (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.
Stars: ✭ 1,408 (-53.49%)
Mutual labels:  itunes
iOS-Restrictions-Recovery
Can find the Restrictions or Screen Time passcode of any iOS 7.0-12.5.5 device. iOS 13 and 14 should work in theory, but Keychain-Dumper is very hit or miss on those versions
Stars: ✭ 50 (-98.35%)
Mutual labels:  itunes
SongProcessor
A beefed up version of AudioKit's Song Processor with the intention of releasing it on the App Store.
Stars: ✭ 36 (-98.81%)
Mutual labels:  itunes
iTunesSearch
🎵 A .NET wrapper to the iTunes search API
Stars: ✭ 20 (-99.34%)
Mutual labels:  itunes
podpodge
Convert YouTube playlists to audio-only RSS feeds for podcast apps to consume.
Stars: ✭ 32 (-98.94%)
Mutual labels:  itunes
mtpThemeManager
An iOS theme manager with all the features. Everything you expect from a theme manager, contains apply theme to whole app, multiple themes, night mode, styles , ...
Stars: ✭ 13 (-99.57%)
Mutual labels:  uicolor
SPPhotoViewer
A customisable smart photoviewer of your photos!!!
Stars: ✭ 14 (-99.54%)
Mutual labels:  uiimage
go-xmp
A native Go SDK for the Extensible Metadata Platform (XMP)
Stars: ✭ 36 (-98.81%)
Mutual labels:  itunes
Olivia
Elegant music player for LINUX
Stars: ✭ 261 (-91.38%)
Mutual labels:  itunes

Swift platform: iOS, tvOS and macOS

UIImageColors

iTunes style color fetcher for UIImage and NSImage. It fetches the most dominant and prominent colors.

preview

Installation

Manual

Copy UIImageColors.swift into your project.

Cocoapods

Add UIImageColors to your Podfile:

pod 'UIImageColors'

Carthage

Add UIImageColors to your Cartfile:

github "jathu/UIImageColors"

Example

Asynchronous example:

let image = UIImage(named: "yeezus.png")

image.getColors { colors in
  backgroundView.backgroundColor = colors.background
  mainLabel.textColor = colors.primary
  secondaryLabel.textColor = colors.secondary
  detailLabel.textColor = colors.detail
}

Synchronous example:

let colors = UIImage(named: "yeezus.png").getColors()

backgroundView.backgroundColor = colors.background
mainLabel.textColor = colors.primary
secondaryLabel.textColor = colors.secondary
detailLabel.textColor = colors.detail

Image Methods

getColors() -> UIImageColors?
getColors(quality: ImageColorsQuality) -> UIImageColors?
getColors(_ completion: (UIImageColors?) -> Void) -> Void
getColors(quality: UIImageColorsQuality, _ completion: (UIImageColors?) -> Void) -> Void

UIImageColors Objects

UIImageColors is struct that contains four different UIColor (or NSColor on macOS) variables.

public struct UIImageColors {
    public var background: UIColor!
    public var primary: UIColor!
    public var secondary: UIColor!
    public var detail: UIColor!
}

UIImageColorsQuality is a enum with four different qualities. The qualities refer to how much the original image is scaled down. Lowest implies smaller size and faster performance at the cost of quality colors. High implies larger size with slower performance with good colors. Highest implies no downscaling and very good colors, but it is very slow.

The default is set to high.

public enum UIImageColorsQuality: CGFloat {
    case lowest = 50 // 50px
    case low = 100 // 100px
    case high = 250 // 250px
    case highest = 0 // No scale
}

License

The license is provided in the project folder. This is based on Panic's OS X ColorArt.


June 2015 - Toronto

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].