Color

role/slot/level 로 구성된 역할 기반 색상 토큰과 slot 선택 규칙

색상은 고정된 색상 값(hex)이 아니라 역할(role) 기반 토큰으로 지정합니다. 색상을 직접 지정하는 대신 역할을 선택하면, 테마나 브랜드가 바뀌어도 코드를 수정하지 않고 알맞은 색상을 유지할 수 있습니다.

개요

색상 토큰은 세 축으로 구성됩니다.

  • role(역할): neutral · primary · brand · inverse · positive · critical · warning · info
  • slot(용도): surface · fill · border · icon · text · ghostBg. 적용하는 CSS 속성에 따라 선택합니다(inverse는 배경 slot 으로 surface 대신 bg를 사용합니다)
  • level(강도): 같은 role 과 slot 내에서의 단계. lowbasehighhighest 순으로 강해지며, 더 낮은 lowest도 드물게 있습니다

예를 들어 neutral.text.base는 기본 본문 색상, primary.fill.base는 강조 버튼의 배경 색상입니다.

slot 선택

같은 색상이라도 적용하는 CSS 속성에 따라 선택하는 slot 이 달라집니다.

CSS 속성slot
텍스트 색(color)text
아이콘 색 · SVG fill/strokeicon
배경색(background)surface (강조 면은 fill, inversebg)
테두리·구분선(border/outline)border
반투명 배경 · 오버레이ghostBg

팔레트

mildang 테마 기준 값입니다. 이름과 구조는 모든 테마에서 동일하며, 값은 테마마다 다릅니다. 각 행은 라이트 / 다크 모드 값을 함께 보여줍니다.

neutral

토큰
surface.low#fefefe / #090b10
surface.base#fafbfc / #15181e
surface.high#f5f6f8 / #1a1d24
surface.highest#edeef2 / #1e2229
surface.transparent#ffffff00 / #1e202400
fill.base#cbcfd8 / #424752
fill.high#1e2024 / #fefefe
icon.low#cbcfd8 / #424752
icon.base#747b8b / #737884
border.low#edeef2 / #1e2229
border.base#e2e4ea / #32353f
border.high#cbcfd8 / #424752
border.highest#1e2024 / #fefefe
text.lowest#6b7180 / #858a93
text.low#4f545f / #a6a9b0
text.base#1e2024 / #fefefe
ghostBg.base#1e20240f / #ffffff1f
ghostBg.high#1e202417 / #ffffff29
ghostBg.highest#1e20241f / #ffffff33

primary

토큰
surface.base#fafbfc / #15181e
surface.high#f5f6f8 / #1a1d24
border.base#e2e4ea / #32353f
border.high#cbcfd8 / #424752
border.highest#1e2024 / #fefefe
fill.base#1e2024 / #fefefe
icon.base#1e2024 / #fefefe
text.base#1e2024 / #fefefe

brand

토큰
surface.low#f7fcfc / #0e1f20
surface.base#ecf8f9 / #0d3336
surface.high#e2f4f5 / #0b2b2d
surface.highest#c0e7ea / #0d2526
border.low#c0e7ea / #0d2526
border.base#9cdadf / #0f4043
border.high#5fc7ce / #0f4c50
border.highest#0c9ca6 / #0da1ab
fill.low#5fc7ce / #0f4c50
fill.base#0c9ca6 / #0da1ab
icon.base#0c9ca6 / #0da1ab
ghostBg.base#0c9ca60f / #0da1ab1f
ghostBg.high#0c9ca617 / #0da1ab29
ghostBg.highest#0c9ca61f / #0da1ab33
text.base#007b85 / #1db4bf

inverse

토큰
bg.base#ffffff / #1e2024
text.base#ffffff / #1e2024
icon.base#ffffff / #1e2024

positive

토큰
surface.low#f6fcf9 / #0d3f2a
surface.base#effaf5 / #0e3424
surface.high#e1f4ec / #0d2b1f
border.base#ace2cb / #0d3f2a
border.high#90dabb / #114f36
border.highest#2aa270 / #29a873
fill.base#2aa270 / #29a873
icon.base#2aa270 / #29a873
ghostBg.base#2aa2700f / #29a8731f
ghostBg.high#2aa27017 / #29a87329
ghostBg.highest#2aa2701f / #29a87333
text.base#1c7d55 / #3cb985

critical

토큰
surface.base#fff5f6 / #4b2024
surface.high#ffebec / #3e1e21
border.base#ffc2c7 / #602429
border.high#ffa3ab / #7a292f
border.highest#fb515f / #ff5c6a
fill.base#fb515f / #ff5c6a
icon.base#fb515f / #d34a56
ghostBg.base#fb515f0f / #ff5c6a1f
ghostBg.high#fb515f17 / #ff5c6a29
ghostBg.highest#fb515f1f / #ff5c6a33
text.base#c8323e / #ff7a86

warning

토큰
surface.base#fff6f0 / #462611
surface.high#fff0e5 / #392213
border.base#ffcba9 / #562d12
border.high#ffb98a / #6f3915
border.highest#f26202 / #f96706
fill.base#f26202 / #f96706
icon.base#fe8534 / #ff8432
ghostBg.base#f262020f / #f967061f
ghostBg.high#f2620217 / #f9670629
ghostBg.highest#f262021f / #f9670633
text.base#bd4b00 / #ff8432

info

토큰
surface.base#f0f8ff / #112e4b
surface.high#e4f3ff / #13293e
border.base#addcff / #13385e
border.high#8accff / #114579
border.highest#0091ff / #0f97ff
fill.base#0091ff / #0f97ff
icon.base#0091ff / #0f97ff
ghostBg.base#0091ff0f / #0f97ff1f
ghostBg.high#0091ff17 / #0f97ff29
ghostBg.highest#0091ff1f / #0f97ff33
text.base#0069e0 / #42adff

그라디언트

그라디언트는 gradient.{계열}.{변형} 합성 토큰으로 지정합니다. 각 토큰은 두 정지점(stop)을 이은 linear-gradient이며, 계열에 따라 방향 변형을 함께 제공합니다. 팔레트와 마찬가지로 값은 mildang 테마 기준이며, 테마마다 다릅니다.

토큰
gradient.primary.default135°#b044ee#4950df
gradient.primary.horizontal90°#b044ee#4950df
gradient.primary.vertical180°#b044ee#4950df
gradient.secondary.default135°#ed4acd#8accff
gradient.tertiary.default338°#ffebfb#c7e6ff
gradient.dim.fadeOutLeftto left#ffffff00#ffffff
gradient.dim.fadeOutRightto right#ffffff00#ffffff
gradient.dim.fadeOutTopto top#ffffff00#ffffff
gradient.dim.fadeOutBottomto bottom#ffffff00#ffffff
  • primary는 기본(default, 135°) 외에 가로(horizontal, 90°)·세로(vertical, 180°) 방향을 제공합니다.
  • secondary · tertiary는 단일 방향(default)만 있습니다.
  • dim은 한쪽 끝이 서서히 투명해지는 페이드 마스크로, 네 방향(fadeOutLeft · fadeOutRight · fadeOutTop · fadeOutBottom)을 제공합니다. 스크롤 영역 가장자리를 배경에 자연스럽게 흐리는 데 사용합니다. 불투명한 끝은 라이트/다크 모드에서 흰색↔검정으로 자동 분기되며, 다크 모드 분기가 없는 테마(goes)는 흰색으로 고정됩니다.

Stop 토큰

합성 그라디언트가 참조하는 정지점(stop1 · stop2)입니다. 단일 색상으로도 노출되어, 그라디언트 외에 그림자(box-shadow)나 텍스트 글로우 같은 표현에 재사용할 수 있습니다. glow는 합성 토큰 없이 정지점만 제공하며, 강조 버튼의 글로우 링에 쓰입니다.

토큰
gradient.primary.stop1#b044ee
gradient.primary.stop2#4950df
gradient.secondary.stop1#ed4acd
gradient.secondary.stop2#8accff
gradient.tertiary.stop1#ffebfb
gradient.tertiary.stop2#c7e6ff
gradient.dim.stop1#ffffff
gradient.dim.stop2#ffffff00
gradient.glow.stop1#c550ed
gradient.glow.stop2#1f72ef

사용법

DS 컴포넌트는 색상을 role 토큰으로 적용합니다. 앱에서 색상을 직접 지정할 때는 CSS 변수로 참조합니다.

css

.banner {
  color: var(--ids-colors-neutral-text-base);
  background: var(--ids-colors-brand-surface-low);
  border: 1px solid var(--ids-colors-neutral-border-base);
}
/* 완성형 그라디언트는 배경으로 */
.hero {
  background: var(--ids-colors-gradient-primary-default);
}
/* stop 은 단색이라 색이 필요한 자리 어디에나 */
.impact {
  box-shadow: 0 0 24px var(--ids-colors-gradient-glow-stop1);
}

mildang-frontend 저장소에서 DS 소스를 직접 사용하는 경우에는 color="neutral.text.base" · bg="gradient.primary.default"처럼 토큰 이름을 그대로 사용할 수 있습니다.

권장 사항

구분내용
권장고정된 색상 값(hex) 대신 role 토큰을 사용합니다.
권장CSS 속성에 맞는 slot 을 선택합니다(텍스트는 text, 배경은 surface/fill).
지양레거시 컬러 토큰(common.1 · success.7 등)은 정의가 없으므로 사용하지 않습니다.
지양{role}.fg.*는 존재하지 않습니다. 텍스트는 text, 아이콘은 icon을 사용합니다.