I have these views by which I add UILabels as text, The Views can have a background color that is dynamic and cannot be selected,
Based on this, I need to find out the font color from only three options: two black or white or dark gray.
For example, on a dark red background, a white font would be more suitable than black, and on a light yellow, perhaps dark gray or black would be readable,
Is there any index that I could check against the background of UIColor to see the illumination?
ios iphone uicolor
user134611
source share