Skip to content

yageek/randomColor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Version Platform License

Random Color Objective-C

Inspired by David Merfield's randomColor.js and the Swift port by Wei Wang.

Cocoapods

pod 'randomColor'

OSX

#import <NSColor+randomColor.h>

NSColor * rand = [NSColor randomColor];

NSColor * blueRand = [NSColor randomColorWithHue:YGColorHueBlue];

NSColor* greenBright = [NSColor randomColorWithHue:YGColorHueGreen luminosity:YGColorLuminosityBright];

NSArray * tenRandom = [NSColor randomColorsWithCount:10];

NSArray * tenYellow = [NSColor randomColorsWithHue:YGColorHueYellow count:10];

iOS

#import <UIColor+randomColor.h>

UIColor * rand = [UIColor randomColor];

NSColor * blueRand = [UIColor randomColorWithHue:YGColorHueBlue];

NSColor* greenBright = [UIColor randomColorWithHue:YGColorHueGreen luminosity:YGColorLuminosityBright];

NSArray * tenRandom = [UIColor randomColorsWithCount:10];

NSArray * tenYellow = [UIColor randomColorsWithHue:YGColorHueYellow count:10];

Acknowledgements

Thanks for David Merfield bringing us randomColor.js, which is a great utility.

License

This project is licensed under the terms of the MIT license.

About

🎨 Port of randomColor to Objective-C

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published