Created
August 28, 2018 08:02
-
-
Save abdullah/1b1563434a9037b2c5fffaf5518d4e91 to your computer and use it in GitHub Desktop.
extract color with regex
This file contains 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
grep -hoEr 'src' -e '(#([0-9a-f]{3}){1,2}|(rgba|hsla)\(\d{1,3}%?(,\s?\d{1,3}%?){2},\s?(1|0|0?\.\d+)\)|(rgb|hsl)\(\d{1,3}%?(,\s?\d{1,3}%?){2}\))' | sort -t: -u -k1,1 > o.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment