# yannickl/DynamicColor

Yet another extension to manipulate colors easily in Swift and SwiftUI

Repository: https://github.com/yannickl/DynamicColor
Canonical: https://ross.abutalabs.com/products/dynamiccolor
Homepage: http://cocoadocs.org/docsets/DynamicColor
Language: Swift
License: MIT
License Family: permissive
Topics: uicolor, nscolor, gradient, color, hex-strings, hex, swiftui
Last push: 2023-11-30T13:02:01+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4111, "days_push": 1007, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3081, forks 146 (observed 2026-08-28T04:07:41.922680+00:00)

## What it is
DynamicColor is a Swift library that extends UIColor, NSColor, and SwiftUI Color with convenient methods for creating and manipulating colors, including hex string parsing, lighten/darken adjustments, and gradient generation. It provides a platform-independent DynamicColor typealias that works across iOS, macOS, tvOS, and watchOS.

## Use cases
- create colors from hex strings in swift
- lighten or darken a uicolor programmatically
- generate color gradients in swiftui
- convert colors to hex strings on ios
- manipulate nscolor values on macos
- build color palettes for an ios app

## When to choose
- you need easy color manipulation (lighten, darken, mix, gradients) in Swift or SwiftUI
- you want cross-platform color code shared between iOS and macOS
- you frequently parse or output hex color strings

## When to avoid
- you only need basic Color initialization already provided by SwiftUI
- your project is not written in Swift
- you need advanced color science features like wide-gamut or perceptual color spaces

## Facets
- artifact type: library
- maturity: stable
- function: ui-components, developer-tools
- domain: mobile-development, frontend, cross-platform
- platform: -
- tags: swift, swiftui, uicolor, nscolor, color-manipulation, hex-colors, gradients, cocoapods, swift-package-manager, ios, macos, mobile, desktop

## Member repositories
- yannickl/DynamicColor (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:41.922680+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:27:50.550841+00:00, confidence not recorded.
  - readme: https://github.com/yannickl/DynamicColor (fetched 2026-08-28T04:07:41.922680+00:00, sha 96f1fb281ef8)
  - homepage: http://cocoadocs.org/docsets/DynamicColor (fetched 2026-08-29T09:43:01.897188+00:00, sha 2b0a64a62d6d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
