i 'm trying to get the effect that apple's music app have , you've noticed that the text color is always stays readable no matter what is in background, for example :
see that green color on black background...
i just want to make my text lighter(white) or darker(black) (according to background image's color )
how can i do this ??
yeah thats true similar questions were asked here before and i checked them too
here's what i got
this questions answer says to get the average color of image then see if image is darker or lighter and accordingly change the text color
but that question is based on Obj C and also the way for getting the average color is in Obj C
so how can i do this in swift ??