Use white text when the black background is enabled

The theme's text colour may not contrast well with black, especially for
themes which expect a light coloured background.
This commit is contained in:
Daniel Thwaites 2022-10-07 06:57:54 +01:00
parent c1506122b4
commit 78055b3868
No known key found for this signature in database
GPG key ID: D8AFC4BF05670F9D

View file

@ -18,13 +18,19 @@ let
cp ${config.lib.stylix.pixel "base01"} $themeDir/progress-bar.png
cp ${./theme.script} $themeDir/stylix.script
substituteInPlace $themeDir/stylix.script \
--replace "%BASE00%" "${
if config.stylix.targets.plymouth.blackBackground
then "0, 0, 0"
else "${base00-dec-r}, ${base00-dec-g}, ${base00-dec-b}"
}" \
--replace "%BASE05%" "${base05-dec-r}, ${base05-dec-g}, ${base05-dec-b}"
${
if config.stylix.targets.plymouth.blackBackground
then ''
substituteInPlace $themeDir/stylix.script \
--replace "%BASE00%" "0, 0, 0" \
--replace "%BASE05%" "1, 1, 1"
''
else ''
substituteInPlace $themeDir/stylix.script \
--replace "%BASE00%" "${base00-dec-r}, ${base00-dec-g}, ${base00-dec-b}" \
--replace "%BASE05%" "${base05-dec-r}, ${base05-dec-g}, ${base05-dec-b}"
''
}
echo "
[Plymouth Theme]