A Lightweight But Powerful Color Kit (Swift)
Switch branches/tags
Nothing to show
Clone or download
Latest commit 3b1f283 Apr 17, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
BCColor update to Swift 3 Sep 18, 2016
BCColorDemo.xcodeproj update to Swift 3 Sep 18, 2016
.swift-version add .swift-version file Sep 19, 2016
.swiftlint.yml Update .swiftlint.yml Apr 17, 2017
.travis.yml Update .travis.yml Apr 17, 2017
BCColor.podspec modify podspec file Sep 18, 2016
LICENSE add .swift-version file Sep 19, 2016
README.md Update README.md Apr 17, 2017
demo1.jpeg add demo images Apr 13, 2016
demo2.jpeg add demo images Apr 13, 2016
demo3.jpeg add demo images Apr 13, 2016
icon.png no message Mar 24, 2016

README.md

BCColor

BCColor Build Status Verison Lisence platform

A lightweight but powerful color kit (Swift)

Features

  • Pick Colors From Image

  • Generate Monochrome Image

  • Support Hex Color Style

  • Lighten / Darken Any Color

  • Generate Two Different Styles of Gradient Color

    BCColor

    BCColor

    BCColor

Installation

Requirements

  • ARC only; iOS 8.0+

Get it as:

1) source files
  1. Download the BCColor repository as a zip file or clone it
  2. Copy the BCColor files into your Xcode project
2) via Cocoa pods

BCColor is available on CocoaPods. Just add the following to your project Podfile:

pod 'BCColor'

If you want to read more about CocoaPods, have a look at this short tutorial.

Basic Usage

// Pick Colors From Image
let colors = image?.getColors()

// Generate Momochrome Image
let monochromeImage = image?.monochrome()

// Hex Color
UIColor.colorWithHex("#5d13e2", alpha: 1)

// Gradient Color
UIColor.gradientColor(CGPointMake(0.0, 0.0), endPoint: CGPointMake(1.0, 1.0), frame:frame, colors: [UIColor.redColor(), UIColor.blueColor()])

UIColor.radialGradientColor(frame, colors: [UIColor.blueColor(), UIColor.greenColor()])

Misc

Author: Boyce Chang

If you like BCColor and use it, could you please:

  • star this repo
  • send me some feedback. Thanks!

License

This code is distributed under the terms and conditions of the MIT license.

Contribution guidelines

If you are fixing a bug you discovered, please add also a unit test so I know how exactly to reproduce the bug before merging.