Skip to content

Releases: iheanyi/swift-palettecolor

PaletteColor 0.1.0

Choose a tag to compare

@cursor cursor released this 09 Sep 16:58
fee2914

First Swift Package Manager release of PaletteColor, a Swift port of AndroidX Palette.

Install

Xcode: File ▸ Add Package Dependencies…https://github.com/iheanyi/swift-palettecolor

Package.swift:

.package(url: "https://github.com/iheanyi/swift-palettecolor", from: "0.1.0")
.product(name: "PaletteColor", package: "swift-palettecolor")

What's included

  • Median-cut palette extraction (Palette, Palette.Swatch, Palette.Target, Palette.Filter) kept integer/Float exact with AndroidX Palette at commit 81432a7d
  • CGImage / UIImage / NSImage / SwiftUI Color conveniences on Apple platforms; pure-Swift core builds and tests on Linux
  • RGBColor WCAG contrast helpers and PaletteScheme for readable accent / wash / text roles
  • Platforms: iOS 15+, macOS 12+, tvOS 15+, watchOS 8+, visionOS 1+ (swift-tools-version 5.9)

License

Apache-2.0. The extraction algorithm is derived from AndroidX Palette, Copyright 2018 The Android Open Source Project (Apache-2.0); see NOTICE for attribution.