fix(design-system): 색 혼합을 oklab으로 해서 무채색이 색상각을 끌어오지 않게 한다 (UI-02)

라이트 테마에서 현재 메뉴 배경이 파랑이 아니라 분홍으로 그려졌다.
color-mix(in oklch, action 14%, panel)에서 panel이 oklch(1 0 0)으로
색상각 0을 명시해, 보간된 색상각이 255에서 345로 끌려갔다.

15곳의 혼합을 모두 in oklab으로 바꿨다. oklab에는 보간할 색상각이
없다. 흰색을 oklch(1 0 none)으로 바꾸는 방법은 버렸다. 앞으로 생길
무채색 토큰마다 같은 규칙을 기억해야 하기 때문이다.
check:design-system이 oklch·lch·hsl·hwb 혼합을 실패로 처리한다.

위험: 섞인 색이 미세하게 달라진다. 시각 골든을 갱신했다.
검증: 바꾸기 전 검사가 15곳을 보고했고, 바꾼 뒤 통과했다.
This commit is contained in:
DongHyeonka
2026-11-01 18:34:28 +09:00
parent 35b183b64f
commit bfa7dd9188
8 changed files with 21 additions and 15 deletions
+6
View File
@@ -51,6 +51,12 @@ for (const { file, source } of cssSources) {
failures.push(`${file} uses undefined token ${match[1]}`);
}
}
// UI-02. Hue-based spaces interpolate the hue angle, and an achromatic
// stop such as oklch(1 0 0) carries hue 0: 14% blue into white came out
// pink. oklab mixes on straight lines and has no hue to drag.
for (const match of source.matchAll(/color-mix\(\s*in\s+(oklch|lch|hsl|hwb)\b/g)) {
failures.push(`${file} mixes colours in ${match[1]}; use oklab`);
}
}
const semanticSource = await readFile(tokenFiles.semantic, "utf8");