Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I get the percentage of each colour? #5

Open
sharp999 opened this issue Jun 20, 2016 · 6 comments
Open

How can I get the percentage of each colour? #5

sharp999 opened this issue Jun 20, 2016 · 6 comments

Comments

@sharp999
Copy link

Is there a way to get the percentage of each of the 5 colours?

@timominous
Copy link
Owner

@sharp999 This is not yet implemented. I may do this over the weekend. You could also submit a pull request if you're interested in tackling this. :)

@sharp999
Copy link
Author

Thanks for your reply! I have really tried but the 'UIColor+TDAdditions.m' & 'UIImage+TDAdditions.m' get complicated and I cant figure out where I can extract the values to calculate percentages? I need to know the amount of pixels used for each of the 5 colours. If I knew where I can get these values I may be able to do this.. :)

@timominous
Copy link
Owner

@sharp999 This can be done but a new type will be needed to return the colors and their approximate counts/percentages instead of color instances only.

@sharp999
Copy link
Author

I think I'd better leave it to you then, as I will likely struggle to implement this feature within the '+TDAdditions' files. If you can add this feature I'd be so grateful! I will be patiently waiting.
Thank you timominous

@nevermore0223
Copy link

I think I'd better leave it to you then, as I will likely struggle to implement this feature within the '+TDAdditions' files. If you can add this feature I'd be so grateful! I will be patiently waiting.
Thank you timominous

Hello ,i've met the same question ,did you solve it?

@timominous
Copy link
Owner

Hey @nevermore0223 sorry but I haven't been able to maintain this project in a while. I'll try to work on this tomorrow if I get the chance but you're also free to submit a pull request anytime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants