Compare commits
No commits in common. "7ea5f53bc5ca8a37963713646666bfe0d7eb8ecd" and "febc18408fa1fd051b815b9e98de16cdd4f961d4" have entirely different histories.
7ea5f53bc5
...
febc18408f
@ -6,8 +6,10 @@ Customisable SVG wallpaper with Decentrala logo.
|
|||||||
|
|
||||||
You could replace all the colors with `replace_colors.sh`.
|
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:
|
||||||
```
|
```
|
||||||
./replace_colors.sh wall.svg wall.repainted.svg 073642 B58900 586E75"
|
git restore wall.svg
|
||||||
```
|
```
|
||||||
|
|
||||||
## Initial colors
|
## Initial colors
|
||||||
|
@ -1,22 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$#" -ne 5 ]; then
|
if [ "$#" -ne 4 ]; then
|
||||||
echo "Usage: $0 <source> <target> <new_bg> <new_fg> <new_shadow>"
|
echo "Usage: $0 <filename> <new_bg> <new_fg> <new_shadow>"
|
||||||
echo "Example: $0 wall.svg wall.repainted.svg 073642 B58900 586E75"
|
echo ""
|
||||||
|
echo "Example: $0 wall.svg 073642 B58900 586E75"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sourceFile=$1
|
filename=$1
|
||||||
targetFile=$2
|
new_bg=$2
|
||||||
new_bg=$3
|
new_fg=$3
|
||||||
new_fg=$4
|
new_shadow=$4
|
||||||
new_shadow=$5
|
|
||||||
|
|
||||||
cp $sourceFile $targetFile
|
sed -i "s/#222222/#$new_bg/g" "$filename"
|
||||||
|
sed -i "s/#444444/#$new_fg/g" "$filename"
|
||||||
|
sed -i "s/#262626/#$new_shadow/g" "$filename"
|
||||||
|
|
||||||
sed -i "s/#222222/#$new_bg/g" "$targetFile"
|
echo "Colors replaced in $filename: bg=$new_bg, fg=$new_fg, shadow=$new_shadow"
|
||||||
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