diff options
author | 2018-12-02 22:20:06 +0100 | |
---|---|---|
committer | 2018-12-03 22:34:45 +0100 | |
commit | 615bec937c7e702f075b7e23aab075ffef9819f6 (patch) | |
tree | 075f9836f7e9bec1327d7c95c68cab1d3afd32fe /tools | |
parent | 8c35bef60c7da9c6cb762b7ae147ea3d6c7615d8 (diff) | |
download | flat-remix-615bec937c7e702f075b7e23aab075ffef9819f6.tar.gz flat-remix-615bec937c7e702f075b7e23aab075ffef9819f6.zip |
Update some apps icons20181204
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/_colorFixer.sh | 32 | ||||
-rw-r--r-- | tools/flat-remix-palette.svg | 52 | ||||
-rw-r--r-- | tools/paletteColors | 38 |
3 files changed, 56 insertions, 66 deletions
diff --git a/tools/_colorFixer.sh b/tools/_colorFixer.sh index 932b7ca90..037499ff1 100755 --- a/tools/_colorFixer.sh +++ b/tools/_colorFixer.sh @@ -1,11 +1,12 @@ #!/bin/bash -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -PALETTE_FILE="${DIR}/paletteColors" +DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +PALETTE_FILE=${DIR}/paletteColors +FILE_NAME=$1 function hexToRgb { color=$1 - if [ $(echo $color | wc -c) = 5 ] + if [[ $(echo $color | wc -c) = 5 ]] then color="#${color:1:1}${color:1:1}${color:2:1}${color:2:1}${color:3:1}${color:3:1}" fi @@ -16,14 +17,19 @@ function hexToRgb { } function findNearestColor { + paletteColors=$(for color in $(cat "$PALETTE_FILE") + do + echo $(hexToRgb $color) + done) + rgb1=($(grep -o -P '(\d+(.\d+)?)(?=%)' <<< $1)) r1=${rgb1[0]} g1=${rgb1[1]} b1=${rgb1[2]} - + smallestDistance=173 bestColor='' - + while read -r paletteColor do rgb2=($(grep -o -P '(\d+(.\d+)?)(?=%)' <<< $paletteColor)) @@ -37,18 +43,10 @@ function findNearestColor { bestColor=$paletteColor fi done <<< $paletteColors - echo $bestColor } - - -paletteColors=$(for color in $(cat "$PALETTE_FILE") - do - echo $(hexToRgb $color) - done) - -for file in $(find -name "$1" -maxdepth 1 -type f -printf "%f\n") +for file in $(find -name "$FILE_NAME" -maxdepth 1 -type f -printf "%f\n") do echo =================================================== echo $file @@ -56,11 +54,11 @@ do file_colors=$(grep -o -P -i 'rgb\((\d+(.\d+)?%,?){3}\)|#((\d|[abcdef]){3}){1,2}' $file | sort -u) for file_color in $file_colors do - if [ ${file_color:0:1} = '#' ] + if [[ ${file_color:0:1} = '#' ]] then - file_color_rgb=$(hexToRgb $file_color) + file_color=$(hexToRgb $file_color) fi - new_color=$(findNearestColor $file_color_rgb) + new_color=$(findNearestColor $file_color) echo $file_color '->' $new_color svg=$(sed "s/$file_color/$new_color/g" <<< $svg) diff --git a/tools/flat-remix-palette.svg b/tools/flat-remix-palette.svg index 8b67948e0..283a6915c 100644 --- a/tools/flat-remix-palette.svg +++ b/tools/flat-remix-palette.svg @@ -2579,17 +2579,18 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="0.70710678" - inkscape:cx="396.75322" - inkscape:cy="376.56784" + inkscape:zoom="0.5" + inkscape:cx="85.582881" + inkscape:cy="972.56374" inkscape:document-units="mm" inkscape:current-layer="layer1" showgrid="false" inkscape:window-width="1720" inkscape:window-height="1378" - inkscape:window-x="1080" + inkscape:window-x="2800" inkscape:window-y="141" - inkscape:window-maximized="0" /> + inkscape:window-maximized="0" + inkscape:snap-global="true" /> <metadata id="metadata5"> <rdf:RDF> @@ -2598,7 +2599,7 @@ <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> + <dc:title /> </cc:Work> </rdf:RDF> </metadata> @@ -2789,30 +2790,21 @@ width="20.999996" id="rect2069-7-6" style="opacity:0.1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.1640954;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> - <rect - transform="scale(-1,1)" - y="-0.75626814" - x="-20.999998" - height="281.40265" - width="20.999996" - id="rect2069-9" - style="opacity:0.3;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.13311601;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> - <rect - transform="scale(-1,1)" - y="-0.75628263" - x="-42.000011" - height="281.40265" - width="20.999996" - id="rect2069-9-8" - style="opacity:0.2;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.13311601;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> - <rect - transform="scale(-1,1)" - y="-0.75628263" - x="-63.000004" - height="281.40265" - width="20.999996" - id="rect2069-2-1-1" - style="opacity:0.1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.13311613;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <path + style="opacity:0.3;fill:#000000;fill-opacity:1;stroke:none;stroke-width:4.42189455;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + d="M 0 0.06640625 L 0 793.76758 L 113.38672 793.76758 L 113.38672 668.6543 L 0.63476562 668.6543 L 0.63476562 585.28906 L 113.38672 585.28906 L 113.38672 0.06640625 L 0 0.06640625 z " + transform="matrix(0.18520834,0,0,0.37419685,-5.1632571e-7,-0.75628306)" + id="rect2069-9" /> + <path + style="opacity:0.2;fill:#000000;fill-opacity:1;stroke:none;stroke-width:4.42189455;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + d="M 113.38672 0.06640625 L 113.38672 585.28906 L 226.77148 585.28906 L 226.77148 0.06640625 L 113.38672 0.06640625 z M 113.38672 668.6543 L 113.38672 793.76758 L 226.77148 793.76758 L 226.77148 668.6543 L 113.38672 668.6543 z " + transform="matrix(0.18520834,0,0,0.37419685,-5.1632571e-7,-0.75628306)" + id="rect2069-9-8" /> + <path + style="opacity:0.1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:4.42189598;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + d="M 226.77148 0.390625 L 226.77148 585.28906 L 340.1582 585.28906 L 340.1582 0.390625 L 226.77148 0.390625 z M 226.77148 668.6543 L 226.77148 794.08984 L 340.1582 794.08984 L 340.1582 668.6543 L 226.77148 668.6543 z " + transform="matrix(0.18520834,0,0,0.37419685,-5.1632571e-7,-0.75628306)" + id="rect2069-2-1-1" /> </g> </g> </svg> diff --git a/tools/paletteColors b/tools/paletteColors index a77d03cfa..bf796316f 100644 --- a/tools/paletteColors +++ b/tools/paletteColors @@ -1,19 +1,19 @@ - #0f2751 #112d5c #133368 #153873 #2c4c81 #44608f #5b739d - #1b3f7c #1e488e #2251a0 #265ab1 #3b6ab9 #517bc1 #678bc8 - #2656a8 #2b62c0 #316fd8 #367bf0 #4a88f1 #5e95f3 #72a2f4 - #347aa1 #3b8bb8 #439dcf #4aaee6 #5cb6e8 #6ebeeb #80c6ed - #198388 #1c959b #20a8af #23bac2 #39c1c8 #4fc8ce #65cfd4 - #12715f #14816c #17917a #19a187 #30aa93 #47b49f #5ebdab - #087142 #0a814b #0b9155 #0ca15e #24aa6e #3db47e #54bd8e - #493525 #533d2a #5e4530 #684c35 #775e49 #86705d #958171 - #714b2b #815631 #916137 #a16b3d #aa7a50 #b48964 #bd9777 - #622e78 #703589 #7e3c9a #8c42ab #9755b3 #a368bc #ae7ac4 - #811035 #93123d #a61545 #b8174c #bf2e5e #c64570 #cd5c81 - #951212 #aa1414 #bf1717 #d41919 #d83030 #dd4747 #e15e5e - #b22525 #ca2a2a #e43030 #fd3535 #fd4949 #fd5d5d #fe7171 - #b25800 #ca6400 #e47100 #fd7d00 #fd8a19 #fd9733 #fea44c - #b38c22 #cc9f26 #e6b32b #ffc730 #ffcc44 #ffd259 #ffd86e - #ae9c49 #c6b253 #e0c85e #f8de68 #f9e177 #f9e586 #fae895 - #272a34 #2d303b #333643 #383c4a #4c4f5c #60636e #737680 - #000000 #191919 #333333 #4c4c4c - #ffffff +#0f2751 #112d5c #133368 #153873 #2c4c81 #44608f #5b739d +#1b3f7c #1e488e #2251a0 #265ab1 #3b6ab9 #517bc1 #678bc8 +#2656a8 #2b62c0 #316fd8 #367bf0 #4a88f1 #5e95f3 #72a2f4 +#347aa1 #3b8bb8 #439dcf #4aaee6 #5cb6e8 #6ebeeb #80c6ed +#198388 #1c959b #20a8af #23bac2 #39c1c8 #4fc8ce #65cfd4 +#12715f #14816c #17917a #19a187 #30aa93 #47b49f #5ebdab +#087142 #0a814b #0b9155 #0ca15e #24aa6e #3db47e #54bd8e +#493525 #533d2a #5e4530 #684c35 #775e49 #86705d #958171 +#714b2b #815631 #916137 #a16b3d #aa7a50 #b48964 #bd9777 +#622e78 #703589 #7e3c9a #8c42ab #9755b3 #a368bc #ae7ac4 +#811035 #93123d #a61545 #b8174c #bf2e5e #c64570 #cd5c81 +#951212 #aa1414 #bf1717 #d41919 #d83030 #dd4747 #e15e5e +#b22525 #ca2a2a #e43030 #fd3535 #fd4949 #fd5d5d #fe7171 +#b25800 #ca6400 #e47100 #fd7d00 #fd8a19 #fd9733 #fea44c +#b38c22 #cc9f26 #e6b32b #ffc730 #ffcc44 #ffd259 #ffd86e +#ae9c49 #c6b253 #e0c85e #f8de68 #f9e177 #f9e586 #fae895 +#272a34 #2d303b #333643 #383c4a #4c4f5c #60636e #737680 +#000000 #191919 #333333 #4c4c4c +#b3b3b3 #cccccc #e6e6e6 #ffffff |