@@ -100,42 +100,28 @@ namespace ts {
100
100
} ;
101
101
}
102
102
103
- // There are ~3 types of terminal color support: 16 colors, 256 and 16m colors
104
- // If there is richer color support, e.g. 256+ we can use extended ANSI codes which are not just generic 'blue'
105
- // but a 'lighter blue' which is closer to the blue in the TS logo.
106
- const supportsRicherColors = sys . getEnvironmentVariable ( "COLORTERM" ) === "truecolor" || sys . getEnvironmentVariable ( "TERM" ) === "xterm-256color" ;
107
-
108
103
function bold ( str : string ) {
109
104
return `\x1b[1m${ str } \x1b[22m` ;
110
105
}
106
+
111
107
function blue ( str : string ) {
112
- if ( supportsRicherColors ) {
113
- // https://jonasjacek.github.io/colors/ - SteelBlue3 ANSI 68
114
- return `\x1B[38;5;68m${ str } \x1B[39;49m` ;
115
- }
116
- else {
117
- // This should probably only hit both Console and Powershell on Windows, as anything more modern supports more colors.
118
- // Those two colorthemes treat 'blue' as navy blue against a black background.
119
- // https://en.wikipedia.org/wiki/ANSI_escape_code#3-bit_and_4-bit
120
- const useThemeBlue = sys . getEnvironmentVariable ( "OS" ) && stringContains ( sys . getEnvironmentVariable ( "OS" ) . toLowerCase ( ) , "windows" ) ;
121
- if ( useThemeBlue ) {
122
- return `\x1b[44m${ str } \x1b[39m` ;
123
- }
124
- else {
125
- return `\x1b[94m${ str } \x1b[39m` ;
126
- }
127
- }
108
+ return `\x1b[94m${ str } \x1b[39m` ;
128
109
}
110
+
111
+ // There are ~3 types of terminal color support: 16 colors, 256 and 16m colors
112
+ // If there is richer color support, e.g. 256+ we can use extended ANSI codes which are not just generic 'blue'
113
+ // but a 'lighter blue' which is closer to the blue in the TS logo.
114
+ const supportsRicherColors = sys . getEnvironmentVariable ( "COLORTERM" ) === "truecolor" || sys . getEnvironmentVariable ( "TERM" ) === "xterm-256color" ;
129
115
function blueBackground ( str : string ) {
130
116
if ( supportsRicherColors ) {
131
117
return `\x1B[48;5;68m${ str } \x1B[39;49m` ;
132
118
}
133
119
else {
134
- return `\x1b[44m${ str } \x1b[ 49m` ;
120
+ return `\x1b[44m${ str } \x1B[39; 49m` ;
135
121
}
136
122
}
137
123
function white ( str : string ) {
138
- return `\x1b[37m ${ str } \x1b[39m` ;
124
+ return `\x1b[97m ${ str } \x1b[39m` ;
139
125
}
140
126
return {
141
127
bold,
0 commit comments