/ContrastingText

Sample code for changing the text color to a contrasting text according to the background color to improve readability.

Primary LanguageSwift

ContrastingText

Sample code for changing the text color to a contrasting text according to the background color to improve readability.

Demo Video

ContrastingTextDemo.mp4

Example

  let backgroundColor = UIColor.black
  let contrastingColor = backgroundColor.contrastingColor()