0

I want my UILabel's text color to be dependent on the UIImage that is beneath it. I think the solution involves getting the average color of my UIImage but I don't know what tools are available for me in swift to get that information. Also, my label is in the top left corner. I don't want the average color of the whole image. I want the average color of the area around my label.

KSR
  • 1,699
  • 15
  • 22
jDoe
  • 61
  • 1
  • 5
  • FYI - it would be much better to show your label's text in either a light color with a dark background or a dark color with a light background. Set the label's background color to be partially transparent. There's no good way to pick a label's color so it shows well on a busy photo with lots of different colors. – rmaddy Sep 12 '16 at 16:21
  • http://stackoverflow.com/questions/26330924/get-average-color-of-uiimage-in-swift – shuvo Sep 12 '16 at 16:24

0 Answers0