aboutsummaryrefslogtreecommitdiff
path: root/tools/_colorFixer.sh
diff options
context:
space:
mode:
authorLibravatar Daniel Ruiz de Alegría <[email protected]>2018-12-06 12:46:42 +0100
committerLibravatar Daniel Ruiz de Alegría <[email protected]>2018-12-06 12:46:42 +0100
commit6dcad7469566dcfff0ab4cd7f4d1ee62aa61fb68 (patch)
tree034a4c061ab66de0b5b8e10c1d8d20604dd020bf /tools/_colorFixer.sh
parent615bec937c7e702f075b7e23aab075ffef9819f6 (diff)
downloadflat-remix-6dcad7469566dcfff0ab4cd7f4d1ee62aa61fb68.tar.gz
flat-remix-6dcad7469566dcfff0ab4cd7f4d1ee62aa61fb68.zip
Update color palette
Diffstat (limited to 'tools/_colorFixer.sh')
-rwxr-xr-xtools/_colorFixer.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/_colorFixer.sh b/tools/_colorFixer.sh
index 037499ff1..0e3796d44 100755
--- a/tools/_colorFixer.sh
+++ b/tools/_colorFixer.sh
@@ -46,7 +46,7 @@ function findNearestColor {
echo $bestColor
}
-for file in $(find -name "$FILE_NAME" -maxdepth 1 -type f -printf "%f\n")
+for file in $(find -iname "$FILE_NAME" -maxdepth 1 -type f -printf "%f\n")
do
echo ===================================================
echo $file
@@ -56,9 +56,11 @@ do
do
if [[ ${file_color:0:1} = '#' ]]
then
- file_color=$(hexToRgb $file_color)
+ file_color_rgb=$(hexToRgb $file_color)
+ new_color=$(findNearestColor $file_color_rgb)
+ else
+ new_color=$(findNearestColor $file_color)
fi
- new_color=$(findNearestColor $file_color)
echo $file_color '->' $new_color
svg=$(sed "s/$file_color/$new_color/g" <<< $svg)