Skip to content

Instantly share code, notes, and snippets.

View combatwombat's full-sized avatar

Robert Gerlach combatwombat

View GitHub Profile
@drewolbrich
drewolbrich / UIColor+Blended.swift
Last active December 4, 2024 21:40
Blends together two UIColors, returning a dynamic color
import UIKit
extension UIColor {
/// Creates a dynamic color from the receiver blended with another color.
///
/// If `weight` is 0, the color of `self` is returned. If `weight` is 1, the color
/// of `otherColor` is returned.
///
/// This method works correctly with light and dark mode. A dynamic color is