Created
January 17, 2019 07:27
-
-
Save hanxi/122563e68b65a2f3470420a8d0a30510 to your computer and use it in GitHub Desktop.
mintty color to putty color
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
ForegroundColour=248,248,242 | |
BackgroundColour=40,42,54 | |
Black=0,0,0 | |
BoldBlack=104,104,104 | |
Red=255,85,85 | |
BoldRed=255,110,103 | |
Green=80,250,123 | |
BoldGreen=90,247,142 | |
Yellow=241,250,140 | |
BoldYellow=244,249,157 | |
Blue=202,169,250 | |
BoldBlue=202,169,250 | |
Magenta=255,121,198 | |
BoldMagenta=255,146,208 | |
Cyan=139,233,253 | |
BoldCyan=154,237,254 | |
White=191,191,191 | |
BoldWhite=230,230,230 |
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
#!/bin/sh | |
transline() | |
{ | |
color=$(echo $1 | cut -d '=' -f 2) | |
echo '"Colour'$2'"="'$color'"' | |
} | |
cat $1 | while read line | |
do | |
case $line in | |
ForegroundColour*) | |
transline $line 0 | |
transline $line 1 | |
transline $line 5 | |
;; | |
BackgroundColour*) | |
transline $line 2 | |
transline $line 3 | |
transline $line 4 | |
;; | |
Black*) | |
transline $line 6 | |
;; | |
BoldBlack*) | |
transline $line 7 | |
;; | |
Red*) | |
transline $line 8 | |
;; | |
BoldRed*) | |
transline $line 9 | |
;; | |
Green*) | |
transline $line 10 | |
;; | |
BoldGreen*) | |
transline $line 11 | |
;; | |
Yellow*) | |
transline $line 12 | |
;; | |
BoldYellow*) | |
transline $line 13 | |
;; | |
Blue*) | |
transline $line 14 | |
;; | |
BoldBlue*) | |
transline $line 15 | |
;; | |
Magenta*) | |
transline $line 16 | |
;; | |
BoldMagenta*) | |
transline $line 17 | |
;; | |
Cyan*) | |
transline $line 18 | |
;; | |
BoldCyan*) | |
transline $line 19 | |
;; | |
White*) | |
transline $line 20 | |
;; | |
BoldWhite*) | |
transline $line 21 | |
;; | |
esac; | |
done | |
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
# 1. trans mintty color to putty | |
sh mintty2putty.sh dracula.minttyrc > dracula.putty | |
# 2. trans putty color to putty tray | |
cat dracula.putty | awk -F'"' '{print $2"\\"$4"\\"}' > dracula.puttytray |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment