Created
October 19, 2016 07:34
-
-
Save volo1st/e867dc4e6e3081cbb0cc876308a889ec to your computer and use it in GitHub Desktop.
Find out how many colours are being used in your project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'Uniq hex colors:' | |
egrep -oIR '#([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?\b' . | cut -d':' -f2 | tr "[A-Z]" "[a-z]" | sort -u | |
echo 'Uniq rgba colors:' | |
egrep -oIR "rgba\\(\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*((0.[1-9])|[01])\\s*\\)" . | cut -d':' -f2 | tr "[A-Z]" "[a-z]" | sort -u |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment