yannickl / DynamicColor

Yet another extension to manipulate colors easily in Swift and SwiftUI
http://cocoadocs.org/docsets/DynamicColor
MIT License
3k stars 141 forks source link

Fix `final func toRGBAComponents()` on macOS for non-RGB colors #56

Closed regexident closed 4 years ago

regexident commented 4 years ago

Handle all colors from compatible non-RGBA colorspaces, instead of just white and black.

Especially since line 72 causes a crash with a non-RGBA color space, otherwise.

codecov[bot] commented 4 years ago

Codecov Report

Merging #56 into master will decrease coverage by 0.03%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #56      +/-   ##
==========================================
- Coverage   93.04%   93.01%   -0.04%     
==========================================
  Files          14       14              
  Lines         374      372       -2     
==========================================
- Hits          348      346       -2     
  Misses         26       26
Flag Coverage Δ
#ios 93.01% <100%> (-0.04%) :arrow_down:
#osx 6.18% <0%> (+0.03%) :arrow_up:
Impacted Files Coverage Δ
Sources/DynamicColor+RGBA.swift 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1e85f94...4fcc489. Read the comment docs.