가독성 우선 팔레트 (Set B)
메인 글의 따뜻한 톤(Set A)과 다른 대안이에요. 파스텔·무드를 배제하고 순수 판별력에 집중 — 모든 색을 흰 배경 대비 기준(4.5:1↑)을 넘는 진한 톤으로 잡고, 색상(Hue)을 최대한 벌려 인접 토큰이 안 헷갈리게 했어요. 굵기는 전부 없음(normal).
전제 — 테마는 메인 글과 동일하게 GitHub Light로 고정, 폰트·gopls 관문 설정도 공유해요. 이 글은 색상 부분만 교체하는 세트예요. (배경 #ffffff · 대상 Go/gopls)
Set A vs Set B — 같은 Go 코드로 비교
똑같은 코드에 두 팔레트를 적용하면 이렇게 달라요. (키워드는 GitHub Light 기본 색 그대로)
Set A · 따뜻한 톤 (정의·타입·함수·패키지 굵게)
// Service 는 실행 요청을 처리한다
type Service struct {
pool *Pool
}
func (ms *Service) Run(req *RunRequest) error {
conn, err := ms.QueryPool(req.Profile)
log.Infow("run", "done")
return conn.Close()
}
type Service struct {
pool *Pool
}
func (ms *Service) Run(req *RunRequest) error {
conn, err := ms.QueryPool(req.Profile)
log.Infow("run", "done")
return conn.Close()
}
Set B · 가독성 우선 (굵기 없이 색상만으로 구분)
// Service 는 실행 요청을 처리한다
type Service struct {
pool *Pool
}
func (ms *Service) Run(req *RunRequest) error {
conn, err := ms.QueryPool(req.Profile)
log.Infow("run", "done")
return conn.Close()
}
type Service struct {
pool *Pool
}
func (ms *Service) Run(req *RunRequest) error {
conn, err := ms.QueryPool(req.Profile)
log.Infow("run", "done")
return conn.Close()
}
차이 한눈에
- Set A — 함수·타입·패키지를 굵게 강조해 구조가 도드라져요. 색은 따뜻하게 절제.
- Set B — 굵기 없이 색상만으로 구분. 모든 색이 진하고 서로 멀어 흰 배경에서 판별력이 최고예요.
- 주의 — Set B는 문자열이 빨강(#e00000)이라 GitHub Light의 빨강 키워드와 가까워요. 신경 쓰이면 아래 튜닝 참고.
Set B 팔레트
function / method#8000c0normal
type#0000ccnormal
namespace (패키지)#3a2f8anormal
parameter#00767anormal
variable · property#1a1a1anormal
string (문자열)#e00000normal
comment (주석)#006400normal
배정 논리
7개 토큰이 색상환에서 서로 떨어진 자리를 차지해요 — 보라(함수)·파랑(타입)·남보라(패키지)·청록(파라미터)·초록(주석)·빨강(문자열)·먹색(변수·필드). 흰 배경에선 회색 명도만으론 파라미터/변수를 나눌 수 없어(어두운 회색끼리 안 갈림), 파라미터는 청록·변수는 먹색으로 색상 자체를 다르게 줬어요. 키워드(테마 기본 붉은색)와 겹치지 않게 붉은 계열은 문자열에만 배정했고요.
선택 튜닝 — 보라(함수 #8000c0)·파랑(타입 #0000cc)·남보라(패키지 #3a2f8a)가 파랑~보라 대역에 몰려 있어요. 셋이 헷갈리면 패키지를 청록 #006d75 쪽으로 밀어 대역을 벌리세요. 단 그러면 파라미터(청록)와 가까워지니 둘 중 하나만 청록으로.
settings.json (색상 부분만)
폰트·gopls 관문은 메인 글과 공유. 이 블록은 색상 부분만 교체하면 돼요. 굵기를 주고 싶으면 각 토큰의 "bold"를 true로.
"editor.semanticTokenColorCustomizations": { "enabled": true, "rules": { "function": { "foreground": "#8000c0", "bold": false }, "method": { "foreground": "#8000c0", "bold": false }, "type": { "foreground": "#0000cc", "bold": false }, "namespace": { "foreground": "#3a2f8a", "bold": false }, "variable": "#1a1a1a", "parameter": "#00767a", "property": "#1a1a1a" } }, "editor.tokenColorCustomizations": { "comments": "#006400", "textMateRules": [ { "scope": ["comment", "comment.line", "comment.block", "punctuation.definition.comment"], "settings": { "foreground": "#006400" } }, { "scope": ["string", "string.quoted", "string.quoted.double", "constant.other.placeholder"], "settings": { "foreground": "#e00000" } } ] }
Set A(따뜻한 톤)는 메인 런북에 있어요. 두 세트를 오가며 실제 코드로 비교해 보고 취향에 맞는 걸 고르면 돼요.