Extracts dominant and prominent colors from images in iOS, tvOS, and macOS apps.
UIImageColors is a Swift library that extracts the most dominant and prominent colors from images, similar to how iTunes picks colors from album art. It returns a structured palette of background, primary, secondary, and detail colors, enabling dynamic UI theming based on image content. The library solves the problem of manually deriving color schemes from images for cohesive app interfaces.
iOS, tvOS, and macOS developers who need to automatically style their app’s UI (like labels, backgrounds, or buttons) to match the colors in user‑provided or dynamic images.
Developers choose UIImageColors for its dead‑simple API that mirrors iTunes’ polished color‑extraction, its performance‑tunable quality settings, and its lightweight, focused implementation without external dependencies.
Fetches the most dominant and prominent colors from an image.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Offers both synchronous and asynchronous getColors() methods that mimic Apple's polished extraction, making it easy to integrate for dynamic UI theming with minimal code.
Provides a UIImageColorsQuality enum to balance color accuracy and performance, allowing scaling from 50px (fastest) to no scaling (highest quality but slow), as detailed in the README.
A single-purpose library with no external dependencies, easy to add manually or via package managers like Cocoapods or Carthage, keeping the project minimal.
Works seamlessly with UIImage on iOS/tvOS and NSImage on macOS, ensuring consistent behavior across Apple ecosystems without platform-specific adjustments.
Only extracts four fixed colors (background, primary, secondary, detail), which may not suffice for designs requiring more nuanced or varied color schemes.
At the highest quality setting, the library does not scale down images, leading to very slow performance as explicitly warned in the README, making it impractical for real-time or batch processing.
Lacks features for custom extraction algorithms, handling different color spaces, or integrating with machine learning, limiting flexibility for specialized or complex use cases.