diff --git a/ImagePalette.podspec b/ImagePalette.podspec index 049b87b..15dea38 100644 --- a/ImagePalette.podspec +++ b/ImagePalette.podspec @@ -16,5 +16,5 @@ Pod::Spec.new do |s| s.source_files = "src/*.swift" s.requires_arc = true - s.dependency 'SwiftPriorityQueue', '~> 1.1.2' + s.dependency 'SwiftPriorityQueue', '~> 1.3.1' end diff --git a/src/PaletteSwatch.swift b/src/PaletteSwatch.swift index b0125b7..42c714d 100644 --- a/src/PaletteSwatch.swift +++ b/src/PaletteSwatch.swift @@ -18,10 +18,10 @@ open class PaletteSwatch { private let hex: Int64 /** This swatch’s color */ - open let color: UIColor + public let color: UIColor /** The number of pixels represented by this swatch */ - open let population: Int64 + public let population: Int64 private var generatedTextColors: Bool = false private var _titleTextColor: UIColor? diff --git a/src/RGBColor.swift b/src/RGBColor.swift index 4b46a11..25d35c7 100644 --- a/src/RGBColor.swift +++ b/src/RGBColor.swift @@ -21,8 +21,9 @@ internal struct RGBColor: Hashable, Equatable { self.green = green self.blue = blue self.alpha = alpha - let maxInt = Int64(Int32.max) - self.hashValue = Int(((alpha << 24) | (red << 16) | (green << 8) | blue) % maxInt) + let maxInt = Int64(Int32.max) + let base = ((alpha << 24) | (red << 16) | (green << 8) | blue) + self.hashValue = Int(base % maxInt) } init(color: UIColor) {