SwiftUI Colorized Control Example
This repository provides an example implementation of using CoreImage filters with custom NSViewRepresentable
implementations of macOS AppKit controls to achieve color-accurate control tint variations.
The CIFilter
implemented is a color cube-type filter which wholesale overrides the lookup value of every color required to draw a control’s layer. As color values are overriden to their exact specification, this approach is advantageous over using a hue rotation or other similar filter.
A SwiftUI ProgressView
and AppKit NSProgressIndicator
— the first being adjusted via the .tint(:)
modifier and the latter being adjusted via a custom CIFilter
.
Say Hi
License
MIT