diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-06 15:01:33 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-06 15:01:33 +0200 |
commit | 2a81ffd2a5b3da64eef04541509a329432c1b463 (patch) | |
tree | 85ebb16b9f92f069b7e6593f8847c4d186b60829 /bin | |
parent | d6a3c1019f833a8236b51244e799b804cc9d90d3 (diff) |
fixed hextorgb
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/common/hextorgb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/common/hextorgb b/bin/common/hextorgb index e70040e..63fcbbc 100755 --- a/bin/common/hextorgb +++ b/bin/common/hextorgb @@ -1,8 +1,7 @@ #!/usr/bin/env sh -cat /dev/stdin | - tr -d '#' | +tr -d '#' | tr '[:lower:]' '[:upper:]' | - sed -r 's/([0-9A-F]{2})/1n/g ; i ibase=16' | + sed 's/\([0-9A-F]\{2\}\)/\1\n/g;iibase=16' | bc | - tr 'n' ',' | + tr '\n' ',' | sed 's/.$// ; s/.*/rgb(&)/' |