diff --git a/palette-generator/Stylix/Palette.hs b/palette-generator/Stylix/Palette.hs index bce7f51..c2857d7 100644 --- a/palette-generator/Stylix/Palette.hs +++ b/palette-generator/Stylix/Palette.hs @@ -48,7 +48,7 @@ instance Species (String,Float,Float, Image PixelRGB8) (V.Vector LAB) where colour <- randomFromImage image return $ palette // [(index, colour)] - fitness (polarity,_,_, _) palette + fitness (polarity,primaryScaleDark,primaryScaleLight, _) palette = realToFrac $ accentDifference - (primarySimilarity/10) - scheme where -- 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. -} 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 -- f(x) = ax+b for multiplier (light)