Compare commits
2 Commits
febc18408f
...
7ea5f53bc5
Author | SHA1 | Date | |
---|---|---|---|
|
7ea5f53bc5 | ||
|
97af5c061f |
@ -6,10 +6,8 @@ Customisable SVG wallpaper with Decentrala logo.
|
||||
|
||||
You could replace all the colors with `replace_colors.sh`.
|
||||
|
||||
Initial colors are hardcoded, so it's one time trick.
|
||||
For the second attempt do not forget to revert initial colors:
|
||||
```
|
||||
git restore wall.svg
|
||||
./replace_colors.sh wall.svg wall.repainted.svg 073642 B58900 586E75"
|
||||
```
|
||||
|
||||
## Initial colors
|
||||
|
@ -1,19 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 4 ]; then
|
||||
echo "Usage: $0 <filename> <new_bg> <new_fg> <new_shadow>"
|
||||
echo ""
|
||||
echo "Example: $0 wall.svg 073642 B58900 586E75"
|
||||
if [ "$#" -ne 5 ]; then
|
||||
echo "Usage: $0 <source> <target> <new_bg> <new_fg> <new_shadow>"
|
||||
echo "Example: $0 wall.svg wall.repainted.svg 073642 B58900 586E75"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
filename=$1
|
||||
new_bg=$2
|
||||
new_fg=$3
|
||||
new_shadow=$4
|
||||
sourceFile=$1
|
||||
targetFile=$2
|
||||
new_bg=$3
|
||||
new_fg=$4
|
||||
new_shadow=$5
|
||||
|
||||
sed -i "s/#222222/#$new_bg/g" "$filename"
|
||||
sed -i "s/#444444/#$new_fg/g" "$filename"
|
||||
sed -i "s/#262626/#$new_shadow/g" "$filename"
|
||||
cp $sourceFile $targetFile
|
||||
|
||||
echo "Colors replaced in $filename: bg=$new_bg, fg=$new_fg, shadow=$new_shadow"
|
||||
sed -i "s/#222222/#$new_bg/g" "$targetFile"
|
||||
sed -i "s/#444444/#$new_fg/g" "$targetFile"
|
||||
sed -i "s/#262626/#$new_shadow/g" "$targetFile"
|
||||
|
||||
echo "Colors replaced"
|
||||
echo "$targetFile: bg=$new_bg, fg=$new_fg, shadow=$new_shadow"
|
||||
|
Loading…
x
Reference in New Issue
Block a user