title: How to generate a dynamic light/dark mode UIImage from Core Graphics?
body: <p>iOS 13 introduced <code>UIImage</code> instances that auto-adopt to the current <code>UIUserInterfaceStyle</code> (aka light or dark mode). However, there seem to be only methods to construct such images from named or system images (<code>imageNamed:inBundle:withConfiguration:</code> or <code>systemImageNamed:withConfiguration:</code>).</p>
  
  <p>Is there a way to dynamically generate a universal light/dark mode <code>UIImage</code> from Core Graphics (e.g. using two <code>CGImage</code>s or using UIGraphicsImageRenderer)?</p>
  
  <p>I don't see any API for that but maybe I'm wrong.</p>