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