colorhash 0.2.0.0 → 0.2.1.0
raw patch · 2 files changed
+2/−2 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- colorhash.cabal +1/−1
- src/Data/Hashable/Color.hs +1/−1
colorhash.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.2 name: colorhash-version: 0.2.0.0+version: 0.2.1.0 synopsis: Generate a color for a hashable object. -- description: homepage: https://github.com/hapytex/colorhash#readme
src/Data/Hashable/Color.hs view
@@ -55,7 +55,7 @@ _altColor :: Col8 -> Col8 _altColor ~(r, g, b)- | 1063 * fromEnum r + 3576 * fromEnum g + 361 * fromEnum b <= 200000 = (255, 255, 255)+ | 299 * fromEnum r + 587 * fromEnum g + 114 * fromEnum b <= (128000 :: Int) = (255, 255, 255) | otherwise = (0, 0, 0) -- | Convert a given 'Hashable' object to a 'Colour' by determining the hash, and using the last 24 bits as source for the red, green, and blue channels of the 'Colour' to construct.