edonv / ColorComponents

A lightweight library for convenient accessing of a color's components.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ColorComponents

ColorComponents is a lightweight library for convenient accessing of just that: a color's components. It allows for easy cross-compatability with Swift's different color types: CGColor, UIColor, NSColor, and SwiftUI's Color. Additionally, it provides a number of initializers and computed properties for convient compatability with hex color integers and strings (with and without alpha at the end), plus different permutations of hue/saturation/lightness. It also conforms to Codable, RawRepresentable, Equatable, and Hashable (it uses a hexadecimal integer under the hood for all of them).

About

A lightweight library for convenient accessing of a color's components.

License:MIT License


Languages

Language:Swift 100.0%