This commit is contained in:
Louis Dalibard 2024-12-24 17:12:11 +01:00
parent fdafa68bd4
commit 8c7d3c50e6

View File

@ -48,7 +48,7 @@ instance Species (String,Float,Float, Image PixelRGB8) (V.Vector LAB) where
colour <- randomFromImage image colour <- randomFromImage image
return $ palette // [(index, colour)] return $ palette // [(index, colour)]
fitness (polarity,_,_, _) palette fitness (polarity,primaryScaleDark,primaryScaleLight, _) palette
= realToFrac $ accentDifference - (primarySimilarity/10) - scheme = realToFrac $ accentDifference - (primarySimilarity/10) - scheme
where where
-- The primary scale should use similar colours, to an extent. -- The primary scale should use similar colours, to an extent.
@ -86,7 +86,7 @@ instance Species (String,Float,Float, Image PixelRGB8) (V.Vector LAB) where
The accent colours are slightly darker. The accent colours are slightly darker.
-} -}
lightScheme lightScheme
= lightnessError (V.fromList [90, 70, 55, 35, 25, 10, 5, 5]) 40 = lightnessError (V.fromList [adjustValue(90.0,0.889,0.111,primaryScaleLight), 70, 55, 35, 25, 10, 5, 5]) 40
-- 0.2, 0.133,0.178,0.85,0.93,0.88,1.0,1.0 for 0.1 scale -- 0.2, 0.133,0.178,0.85,0.93,0.88,1.0,1.0 for 0.1 scale
-- f(x) = ax+b for multiplier (light) -- f(x) = ax+b for multiplier (light)