Swiftpack.co -  RougeWare/Swift-Color-Swatches as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
RougeWare/Swift-Color-Swatches
Turn an NSColor or UIColor into an image
.package(url: "https://github.com/RougeWare/Swift-Color-Swatches.git", from: "2.0.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: 0
Last commit: 1 week ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

2.0.0 - Requiring latest RectangleTools
1 week ago

This requirement is mostly done to make sure that the ecosystem remains harmonious; you can always import the latest versions of all packages into your project.

This means we also require its platform versions and Swift tools version, bumping this repo to 2.0.0.

Also took this opportunity to give this package a proper readme! 🥳

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