Skip to content

efecan/HumanReadableColor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

HumanReadableColor

Calculates the closest color name with the help of hsl and rgv values of the color. CIE94 formula is used for the calculation matrix (http://en.wikipedia.org/wiki/Color_difference#CIE94)

Usage

  1. Import HumanReadableColor header file
#import "HumanReadableColor.h"
  1. Initialize HumanReadableColor with a standard NSColor object.
NSColor *color = [NSColor colorWithCalibratedRed:0.5f green:0.5f blue:0.5f alpha:1.0f];
HumanReadableColor *hrc = [[HumanReadableColor alloc] initWithColor: color];

NSString *colorName = [hrc getColorName];
  1. That's it! You can use the NSString wherever you want.

Credits

My name is Efecan Erdur, my friends call me Efe. You can follow me @efecan.

Licence

You can do whatever you want with this little code. It'd be nice if you just reference me.

About

HumanReadableColor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published