How can I get the percentage of each colour?
sharp999 opened this issue · 6 comments
Is there a way to get the percentage of each of the 5 colours?
@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. :)
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.. :)
@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.
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
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?
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.