Skip to content

Commit

Permalink
Remove whitespace and fix indentaiton
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoffer Winterkvist committed Nov 8, 2016
1 parent c8933ab commit b734eae
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Source/Mac/NSImage+Hue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extension NSImage {
ctx?.imageInterpolation = .high
draw(in: NSMakeRect(0, 0, newSize.width, newSize.height), from: NSRect.zero, operation: .copy, fraction: 1)
scaledImage.unlockFocus()

return scaledImage
}

Expand Down Expand Up @@ -87,7 +87,7 @@ extension NSImage {
imageColors.add(color)
}
}

var sortedColors = [CountedColor]()

for color in imageBackgroundColors {
Expand Down Expand Up @@ -140,18 +140,18 @@ extension NSImage {

if primaryColor == nil &&
color.isContrastingWith(imageBackgroundColor) {
primaryColor = color
primaryColor = color
} else if secondaryColor == nil &&
primaryColor != nil &&
primaryColor!.isDistinctFrom(color) &&
color.isContrastingWith(imageBackgroundColor) {
secondaryColor = color
secondaryColor = color
} else if secondaryColor != nil &&
(secondaryColor!.isDistinctFrom(color) &&
primaryColor!.isDistinctFrom(color) &&
color.isContrastingWith(imageBackgroundColor)) {
detailColor = color
break
detailColor = color
break
}
}

Expand Down

0 comments on commit b734eae

Please sign in to comment.