단색(monochrome) SVG 아이콘이 시각적으로는 멀티컬러처럼 보이는 트릭. fill-rule="evenodd"로 외곽 도형에 안쪽 도형을 cut-out 시키면, 뚫린 자리에 부모 배경이 비춰서 두 번째 색처럼 보인다. 디자인 시스템에서 status 아이콘(success/warning/error/info)을 단일 mono 자산으로 처리할 때 자주 쓰인다.
evenodd fill rule은 한 path 안에 여러 sub-path가 있을 때 "겹친 영역은 채우지 않음"으로 해석한다:
<path fill-rule="evenodd" clip-rule="evenodd"
d="M [outer circle] Z
M [exclamation dot] Z
M [exclamation bar] Z"
fill="black" />
→ 외곽 원은 채워지고, 안쪽 느낌표 sub-path는 cut-out 되어 투명. 부모 배경이 그 자리에 비친다.
검증 예 (CircleSuccess):
outline 버전 path: 외곽 원 + 안쪽 원 + 체크 → 도넛형 외곽 + 흰 체크
fill 버전 path: 외곽 원 + 체크 → 통짜 원 + 흰 체크
두 버전의 차이는 sub-path 1개. evenodd가 그 차이를 컬러 효과로 변환.
// 화면 배경이 흰색이면:
<IconCircleAlert color="orange" />
// → 주황 동그라미 + 흰 느낌표 (배경이 비춤)
// 컬러 카드 위에 두려면 명시적 배경:
<View style={{ backgroundColor: 'white', borderRadius: 32 }}>
<IconCircleAlert color={statusRed} />
</View>
부모 컨테이너 배경색이 자동으로 두 번째 색이 됨. 별도 멀티컬러 SVG variant 불필요.
tintColor 또는 color prop만 바꿈<View backgroundColor="white">로 감싸기.grep -l 'fill-rule="evenodd"' assets/icons/mono/
Mono SVG에 fill-rule="evenodd" + 단일 fill 속성이면 cut-out 트릭 적용된 아이콘. 별도 Color variant로 복제하지 말 것 — 이미 멀티컬러 효과가 가능.
디자이너가 의도적으로 만든 패턴인지 export 실수인지 한 번 컨펌 권장:
CircleInfo, CircleSuccess, CircleAlert 류 status 아이콘에서 자주 등장하는 의도된 패턴.
단색 SVG에서
fill-rule="evenodd"cut-out으로 부모 배경을 두 번째 색으로 빌려쓰면, 한 mono 아이콘이 모든 status color에 자동 적응한다.
Share your reflections on this piece
Sign in to join the conversation
Sign InNo comments yet. Start the conversation.
No close follow-up reading found yet.
Explore frontend to keep moving through related notes.