Latest 1.0.0
Homepage https://github.com/ericdke/DetectImageColorsFramework
License MIT
Platforms osx 10.9, requires ARC
Authors

Detect Image Colors

Extracts 4 main colors from an image: primary, secondary, detail and background.

Install

Manual

Drag and drop the DetectImageColorsFramework.framework file into your Xcode project.

In your project info, in General, add the framework to Embedded Binaries and to Linked Frameworks And Libraries; in Build Options, set Embedded Content Contains Swift Code to Yes.

Build the scheme.

CocoaPods

At the root of your project, create a Podfile file and paste this content:

use_frameworks!
pod ‘DetectImageColorsFramework’

Then run this command:

pod install

Finally, open the .xcworkspace file.

Code Usage

Import the framework:

import DetectImageColorsFramework

Optional: tweak CDSettings variables.

Create color candidates from an NSImage:

let colorCandidates = image.getColorCandidates()

WIP

Version 1.0.0 – OS X only

TODO: iOS version, speed improvements

Source

This repository is a framework version of https://github.com/ericdke/DetectImageColors

Latest podspec

{
    "name": "DetectImageColorsFramework",
    "version": "1.0.0",
    "summary": "Extracts 4 main colors from an image: primary, secondary, detail and background.",
    "description": "Extracts 4 main colors from an image: primary, secondary, detail and background. OS X framework written in Swift 2.2",
    "homepage": "https://github.com/ericdke/DetectImageColorsFramework",
    "license": {
        "type": "MIT",
        "file": "LICENSE.md"
    },
    "authors": {
        "Eric D.": "[email protected]"
    },
    "platforms": {
        "osx": "10.9"
    },
    "requires_arc": true,
    "source": {
        "git": "https://github.com/ericdke/DetectImageColorsFramework.git",
        "tag": "1.0.0",
        "submodules": true
    },
    "source_files": "DetectImageColorsFramework/**/*.{h,swift}"
}

Pin It on Pinterest

Share This