This repository has been archived by the owner on Jun 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Colors From Images
Daniel Chick edited this page Aug 30, 2017
·
2 revisions
Chameleon now supports the extraction of colors from images. You can either generate both flat and non-flat color schemes from an image, or easily extract the average color.
To generate a color scheme simply do the following:
[NSArray arrayOfColorsFromImage:(UIImage *)image withFlatScheme:(BOOL)flatScheme];
NSArray(ofColorsFromImage: UIImage, withFlatScheme: Bool)
ColorsFromImage(image, isFlatScheme)
ColorsFromImage(image, isFlatScheme)
To extract the average color from an image, you can also do:
[UIColor colorWithAverageColorFromImage:(UIImage *)image];
UIColor(averageColorFromImage: UIImage)
AverageColorFromImage(image)
AverageColorFromImage(image)