
VSCode 통합 터미널의 Railscast 색 구성표
2022-10-13 last update
10 minutes reading terminal vscode railscasts colorscheme나 같은 개발을 위해 여전히 Railscast 색 구성표를 사용하는 사람이 있습니까? 10년 이상 사용해 온 것 외에도 부드러운 흙빛이 마음에 듭니다. 그것은 모두 Sublime Text에서 시작되었으며 일관성을 위해 iTerm2에 채택했습니다. Sublime Text 2에서 VSCode로 전환할 때 색상 구성표도 존재한다는 사실을 알게 되어 기뻤습니다. 그 이후로 나는 아주 드물게 사용하지만 통합 터미널의 기본 색 구성표가 마음에 들지 않았습니다.
오늘 저는 여기에서 요점으로 찾을 수 있는 VSCode의 통합 터미널에 대한 색상 사용자 정의를 만들었습니다. https://gist.github.com/donni106/04a9a3cff5f41c45db52785425732482

여기에서 사용하기 쉬운 멋진 스크립트를 찾았습니다. https://gist.github.com/2xAA/bd01638dc9ca46c590fda06c4ef0cc5a
스크립트를 실행하기 전에 itermcolors 파일을 JSON으로 변환해야 했습니다. JSON은 https://json2plist.sinaapp.com (Plist -> JSON)에서 도구를 사용할 수 있었습니다.
결과는
이제 같은 빛으로 빛난다 ⭐
오늘 저는 여기에서 요점으로 찾을 수 있는 VSCode의 통합 터미널에 대한 색상 사용자 정의를 만들었습니다. https://gist.github.com/donni106/04a9a3cff5f41c45db52785425732482

여기에서 사용하기 쉬운 멋진 스크립트를 찾았습니다. https://gist.github.com/2xAA/bd01638dc9ca46c590fda06c4ef0cc5a
const col = [] // run your .itermcolors file through a parser to get json and replace the array with the output
function componentToHex(c) {
const hex = c.toString(16)
return hex.length === 1 ? `0${hex}` : hex
}
const mapping = {
'terminal.background':'Background Color',
'terminal.foreground':'Foreground Color',
'terminalCursor.background':'Cursor Text Color',
'terminalCursor.foreground':'Cursor Color',
'terminal.ansiBlack':'Ansi 0 Color',
'terminal.ansiBlue':'Ansi 4 Color',
'terminal.ansiBrightBlack':'Ansi 8 Color',
'terminal.ansiBrightBlue':'Ansi 12 Color',
'terminal.ansiBrightCyan':'Ansi 14 Color',
'terminal.ansiBrightGreen':'Ansi 10 Color',
'terminal.ansiBrightMagenta':'Ansi 13 Color',
'terminal.ansiBrightRed':'Ansi 9 Color',
'terminal.ansiBrightWhite':'Ansi 15 Color',
'terminal.ansiBrightYellow':'Ansi 11 Color',
'terminal.ansiCyan':'Ansi 6 Color',
'terminal.ansiGreen':'Ansi 2 Color',
'terminal.ansiMagenta':'Ansi 5 Color',
'terminal.ansiRed':'Ansi 1 Color',
'terminal.ansiWhite':'Ansi 7 Color',
'terminal.ansiYellow':'Ansi 3 Color'
}
console.log(JSON.stringify(Object.keys(mapping).reduce((obj, vsCodeKey) => {
const itermKey = mapping[vsCodeKey]
const red = componentToHex(Math.round(col[0][itermKey]['Red Component'] * 255))
const green = componentToHex(Math.round(col[0][itermKey]['Green Component'] * 255))
const blue = componentToHex(Math.round(col[0][itermKey]['Blue Component'] * 255))
obj[vsCodeKey] = `#${red}${green}${blue}`
return obj
}, {}), null, 2))
스크립트를 실행하기 전에 itermcolors 파일을 JSON으로 변환해야 했습니다. JSON은 https://json2plist.sinaapp.com (Plist -> JSON)에서 도구를 사용할 수 있었습니다.
결과는
workbench.colorCustomizations
키 아래의 VSCode 설정에서 복사해야 합니다.이제 같은 빛으로 빛난다 ⭐