Swiftpack.co - RougeWare/Swift-Color-Swatches as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by RougeWare.
RougeWare/Swift-Color-Swatches 2.1.0
Turn an NSColor or UIColor into an image
⭐️ 2
🕓 2 years ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/RougeWare/Swift-Color-Swatches.git", from: "2.1.0")

Swift 5 swift package manager 5.3 is supported Requires macOS 10.15+, OS 13+, tvOS 13+, watchOS 6+

Swift Color Swatches

A simple Swift package - all it does is draw rectangles of solid colors as NSImages and UIImages.

You can simply use .swatch on a native image:

import AppKit
import ColorSwatches

NSImage.swatch(color: .systemPurple)

Or .swatch on a native color:

import UIKit
import ColorSwatches

UIColor.systemPurple.swatch()

GitHub

link
Stars: 2
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

2.1 - RectangleTools 2.10
2 years ago

RectangleTools found a way to solve the same problem without a major version change, so this downgraded to the newer RectangleTools 2.10.1

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics