~/talk

Extending UIColor to Support Custom Styling

Talkat Hacking with Swift Live 2019 · 2019-07-08..07-09· [ios, developer-experience]
slides:none on file

Explains how UIColor extensions compute luminance from HSB/RGB components, implement the WCAG contrast formula, and automatically adjustColor brightness so a backend‑supplied or user‑picked color meets a min contrast ratio 7. Shows using UIColor.getHue(_:saturation:brightness:alpha:) and resolvedColor() to convert to CGColor, demonstrates examples (white vs black yields ~20:1, pink on black ~11:1, yellow on white 1:1), and outlines using iOS 13 dynamic colors and asset catalog color sets to handle dark mode.

AI-written summary · about

  1. 0:00Introduction to color
  2. 1:31Understanding color spaces
  3. 4:40Deep dive into HSB
  4. 11:17Contrast and accessibility
  5. 13:00App themes and dark mode
  6. 14:43iOS 13 dynamic colors
  7. 19:25Custom color challenges
  8. 23:33Code solutions for contrast
  9. 29:02Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.