Skip to content

Commit

Permalink
Fix additional warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
zenangst committed Jan 15, 2019
1 parent 31d6dcb commit 1cf4448
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/macOS/NSColor+Hue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ public extension NSColor {
let threshold: CGFloat = 0.25
var result = false

if fabs(bg[0] - fg[0]) > threshold || fabs(bg[1] - fg[1]) > threshold || fabs(bg[2] - fg[2]) > threshold {
if fabs(bg[0] - bg[1]) < 0.03 && fabs(bg[0] - bg[2]) < 0.03 {
if fabs(fg[0] - fg[1]) < 0.03 && fabs(fg[0] - fg[2]) < 0.03 {
if abs(bg[0] - fg[0]) > threshold || abs(bg[1] - fg[1]) > threshold || abs(bg[2] - fg[2]) > threshold {
if abs(bg[0] - bg[1]) < 0.03 && abs(bg[0] - bg[2]) < 0.03 {
if abs(fg[0] - fg[1]) < 0.03 && abs(fg[0] - fg[2]) < 0.03 {
result = false
}
}
Expand Down

0 comments on commit 1cf4448

Please sign in to comment.