Skip to content

Color-accurate control tint overrides for SwiftUI macOS applications.

Notifications You must be signed in to change notification settings

stephancasas/SwiftUIColorizedControlExample

Repository files navigation

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 NSProgressIndicatorthe first being adjusted via the .tint(:) modifier and the latter being adjusted via a custom CIFilter.

Say Hi

Follow Stephan on Twitter

License

MIT

About

Color-accurate control tint overrides for SwiftUI macOS applications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages