diff --git a/palette-generator/Stylix/Main.hs b/palette-generator/Stylix/Main.hs index ddeecb0..5673d32 100644 --- a/palette-generator/Stylix/Main.hs +++ b/palette-generator/Stylix/Main.hs @@ -22,7 +22,7 @@ loadImage :: String -- ^ Path to the file loadImage input = either error id <$> readImage input mainProcess :: (String,String,String, String, String) -> IO () -mainProcess (polarity,primaryScaleDark,primaryScaleLight, input, output) = do +mainProcess (polarity, primaryScaleDark, primaryScaleLight, input, output) = do putStrLn $ "Processing " ++ input -- Random numbers must be deterministic when running inside Nix. diff --git a/palette-generator/Stylix/Palette.hs b/palette-generator/Stylix/Palette.hs index 2e5adc7..6f06fea 100644 --- a/palette-generator/Stylix/Palette.hs +++ b/palette-generator/Stylix/Palette.hs @@ -86,7 +86,16 @@ instance Species (String,Double,Double, Image PixelRGB8) (V.Vector LAB) where The accent colours are slightly darker. -} lightScheme - = lightnessError (V.fromList [(adjustValue 90.0 0.889 0.111 primaryScaleLight), 70, 55, 35, 25, 10, 5, 5]) 40 + = lightnessError (V.fromList [ + (adjustValue 90.0 0.889 0.111 primaryScaleLight), + (adjustValue 70.0 0.963 0.037 primaryScaleLight), + (adjustValue 55.0 0.913 0.087 primaryScaleLight), + (adjustValue 35.0 0.167 0.883 primaryScaleLight), + (adjustValue 25.0 0.078 0.922 primaryScaleLight), + (adjustValue 10.0 0.133 0.087 primaryScaleLight), + (adjustValue 5.0 0.0 1.0 primaryScaleLight), + (adjustValue 5.0 0.0 1.0 primaryScaleLight) + ]) 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) @@ -104,7 +113,16 @@ instance Species (String,Double,Double, Image PixelRGB8) (V.Vector LAB) where The accent colours are slightly brighter. -} darkScheme - = lightnessError (V.fromList [10, 30, 45, 65, 75, 90, 95, 95]) 60 + = lightnessError (V.fromList [ + (adjustValue 10.0 0.889 0.111 primaryScaleDark), + (adjustValue 30.0 0.963 0.037 primaryScaleDark), + (adjustValue 45.0 0.913 0.087 primaryScaleDark), + (adjustValue 65.0 0.167 0.883 primaryScaleDark), + (adjustValue 75.0 0.078 0.922 primaryScaleDark), + (adjustValue 90.0 0.133 0.087 primaryScaleDark), + (adjustValue 95.0 0.0 1.0 primaryScaleDark), + (adjustValue 95.0 0.0 1.0 primaryScaleDark) + ]) 60 -- 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 (dark)