BCColor – Swift Based Color Helper Library For Gradients, Getting Image Colors And Image And More

BCColor is an open source Swift based helper library from Boyce Chang providing an assortment of color helpers with a clean syntax.

BCColor includes helpers for:

  • Getting colors from an image
  • Setting colors to monchrome
  • Getting lighter/darker colors
  • Creating gradients
  • Colors from hex values

This snippet from the readme shows the basic usage of BCColor:

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

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

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

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

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

BCColor

You can find BCColor on Github here.

A nice Swift based color helper library.

Original article: BCColor – Swift Based Color Helper Library For Gradients, Getting Image Colors And Image And More

©2016 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Leave a Reply

Your email address will not be published. Required fields are marked *