When in dark mode, it seems that all the color set in PKInkingTool are reversed in brightness. If I choose a bright red I got a dark red, and vice versa.
For example, if I use UIColorPickerViewController to select a color:
PKInkingTool(.pencil, color:color, width:10)
The color that shows up in PKCanvasView is not the correct color. The only way that seems to work is not to support dark mode.
overrideUserInterfaceStyle = .light
Is there a way to get PencilKit to use the correct color rather than convert color automatically?
UIColor.label
in dark mode, the pen draws in black (I am creating a custom PencilTool). Did you find a workaround? I can not explicitly use black or white as the colours (obviously) do not change automatically. the only workaround that seems to work is tu useseparatorColor
instead oflabel
. It is lighter but at least it automatically adapts. – Aurie