Skip to content

[#6] feat: DVDesign Color 추가#11

Open
yeseonglee wants to merge 2 commits into
developfrom
design/#6/Color_Setting
Open

[#6] feat: DVDesign Color 추가#11
yeseonglee wants to merge 2 commits into
developfrom
design/#6/Color_Setting

Conversation

@yeseonglee
Copy link
Copy Markdown

@yeseonglee yeseonglee commented May 12, 2026

✨ What’s this PR?

📌 관련 이슈 (Related Issue)

  • Closes #이슈번호

🧶 주요 변경 내용 (Summary)

디자인 시스템 DVDesign 모듈의 컬러 관리 방식을 개선하고, 폰트 시스템(DVFont)과 일관된 사용성을 갖추도록 구성.

  • DVColor Enum 도입: Color extension 방식에서 Enum 기반 토큰 시스템으로 전환
  • Palette 기반 설계: 피그마 디자인 가이드와 1:1 대응되는 17종의 컬러 팔레트 정의
  • 일관된 UX 제공: 폰트와 동일한 전용 Modifier(.dvForegroundColor, .dvBackgroundColor) 및 Static Factory(.dv()) 제공
  • 구조 개선: Foundations/Color 디렉토리 하위로 관련 소스 코드(Enum, Extension, ViewModifier) 통합 관리

🧪 테스트 / 검증 내역

  • DVColor Enum을 통한 17종 컬러 에셋 매핑 정상 작동 확인
  • .dvFont().dvForegroundColor() Modifier 간의 혼용성 검증
  • 프로젝트 빌드 및 정적 분석(Linter/Type Check) 이상 없음

💬 기타 공유 사항

  • 피그마 싱크 우선: 현재 피그마 가이드에 시맨틱 네이밍이 명시되어 있지 않아, 개발 편의성과 디자인 소통을 위해 시맨틱 레이어를 제외한 팔레트 명칭만으로 구성했습니다.
  • 확장성: 추후 다크모드 대응이 필요할 경우, DVColor Enum 내부의 color 계산 프로퍼티에서 colorScheme 분기 로직을 통합 관리할 수 있도록 구조를 마련해 두었습니다.

🙇🏻‍♀️ 리뷰 가이드 (선택)

  • Projects/DVDesign/Sources/Foundations/Color/DVColor.swift 파일의 에셋 매핑 로직이 누락된 색상 없이 정확한지 확인 부탁드립니다.
  • DVFont와 동일하게 도입된 .dv() static method 사용성이 직관적인지 의견 부탁드립니다.

Summary by CodeRabbit

  • New Features
    • Added a comprehensive color design system with semantic tokens for common UI states (danger, warning) and grayscale variants
    • Implemented automatic light and dark mode color support across the entire palette
    • Added convenient styling methods for applying colors to UI elements

@yeseonglee yeseonglee added the 🎨 Design UI 디자인 작업 label May 12, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

Warning

Rate limit exceeded

@yeseonglee has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 46 minutes and 12 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 250e8e43-89ba-44c0-bbf6-5cb927455be8

📥 Commits

Reviewing files that changed from the base of the PR and between 4315a8d and fe11b9f.

📒 Files selected for processing (16)
  • Projects/DVDesign/Resources/Assets.xcassets/color/black.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/danger.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/gray100.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/gray200.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/gray300.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/gray400.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/gray500.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/gray600.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/gray700.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/gray800.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/gray900.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/vault dark.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/vault green dark.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/vault green tint.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/warning.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/white.colorset/Contents.json

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: String must contain at most 250 character(s) at "tone_instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
📝 Walkthrough

Walkthrough

This PR adds a comprehensive color design system by defining 17 color assets in Xcode's asset catalog and creating a Swift token layer (DVColor enum) with view modifier extensions to apply these colors to SwiftUI components.

Changes

Color Design System

Layer / File(s) Summary
Color asset catalog foundation
Projects/DVDesign/Resources/Assets.xcassets/color/Contents.json
Root asset catalog metadata for the color directory, identifying the asset bundle as Xcode-managed.
Color set definitions
Projects/DVDesign/Resources/Assets.xcassets/color/black.colorset/Contents.json, Projects/DVDesign/Resources/Assets.xcassets/color/danger.colorset/Contents.json, Projects/DVDesign/Resources/Assets.xcassets/color/gray(100-900).colorset/Contents.json, Projects/DVDesign/Resources/Assets.xcassets/color/vault(dark, green, green dark, green tint).colorset/Contents.json, Projects/DVDesign/Resources/Assets.xcassets/color/warning.colorset/Contents.json, Projects/DVDesign/Resources/Assets.xcassets/color/white.colorset/Contents.json
17 color assets defined with display-p3 or sRGB color spaces, each providing a default universal variant and a dark-mode (luminosity) appearance variant. White colorset updated to use display-p3 color space with corrected red component.
Color token enum and computed accessors
Projects/DVDesign/Sources/Foundations/Color/DVColor.swift
DVColor public enum with CaseIterable conformance enumerating all 17 color tokens (e.g., vaultGreen, gray900, danger, warning). Computed property color: Color maps each token to its corresponding asset via module-bundled Color(_:bundle:) initialization.
Color token factory and view modifiers
Projects/DVDesign/Sources/Foundations/Color/Color+DVColor.swift, Projects/DVDesign/Sources/Foundations/Color/View+DVColor.swift
Color.dv(_:) static factory unwraps a DVColor token to its underlying Color. View.dvForegroundColor(_:) and View.dvBackgroundColor(_:) modifiers apply token colors via foregroundStyle and background respectively.
Cleanup
Projects/DVDesign/Sources/Foundations/PlaceholderC.swift
Removed placeholder comment.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • DevaultProject/Devault-macOS#5: Both PRs establish foundational design system color assets and APIs; the related PR created the initial Assets.xcassets structure while this PR expands it with specific color definitions and a token-based abstraction layer.

Suggested reviewers

  • dlguszoo

A palette of colors, neat and bright,
Tokens guide the way with design might,
From vault green deep to warnings' flame,
SwiftUI views now speak the same!
🐰✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title references a feature addition for DVDesign Color with a ticket number, but uses Korean text that may not be universally clear to all team members reviewing the history.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch design/#6/Color_Setting

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Projects/DVDesign/Resources/Assets.xcassets/color/vault` green
dark.colorset/Contents.json:
- Line 5: The dark-variant Contents.json uses "color-space" : "display-p3" while
the light variant uses "srgb", causing a tone mismatch; open the Contents.json
for the vault green dark.colorset and change its "color-space" value to match
the light variant (or vice versa) so both entries use the same color-space
string ("srgb" or "display-p3") for the "color-space" key to keep light/dark
color consistency.

In `@Projects/DVDesign/Resources/Assets.xcassets/color/vault`
green.colorset/Contents.json:
- Around line 5-31: The Contents.json entry for the "vault green" color asset
uses "color-space" : "srgb" for both light and dark appearances, causing a
mismatch with other new tokens that use "display-p3"; update the "color-space"
fields in the vault green asset's Contents.json (both appearance blocks under
the "color" object) from "srgb" to "display-p3" so it matches the project's
color-space convention and preserves correct rendering and token consistency.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 69ba71ad-fcdb-4d05-be56-586b1012248e

📥 Commits

Reviewing files that changed from the base of the PR and between d9d8484 and 4315a8d.

📒 Files selected for processing (22)
  • Projects/DVDesign/Resources/Assets.xcassets/color/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/black.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/danger.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/gray100.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/gray200.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/gray300.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/gray400.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/gray500.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/gray600.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/gray700.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/gray800.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/gray900.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/vault dark.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/vault green dark.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/vault green tint.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/vault green.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/warning.colorset/Contents.json
  • Projects/DVDesign/Resources/Assets.xcassets/color/white.colorset/Contents.json
  • Projects/DVDesign/Sources/Foundations/Color/Color+DVColor.swift
  • Projects/DVDesign/Sources/Foundations/Color/DVColor.swift
  • Projects/DVDesign/Sources/Foundations/Color/View+DVColor.swift
  • Projects/DVDesign/Sources/Foundations/PlaceholderC.swift
💤 Files with no reviewable changes (1)
  • Projects/DVDesign/Sources/Foundations/PlaceholderC.swift

Comment on lines +5 to +31
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x75",
"green" : "0x9E",
"red" : "0x2D"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x75",
"green" : "0x9E",
"red" : "0x2D"
}
},
"idiom" : "universal"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# 1) Show all color spaces used in the new color assets.
fd 'Contents.json' Projects/DVDesign/Resources/Assets.xcassets/color -t f \
  -x sh -c 'printf "\n== %s ==\n" "$1"; rg -n "\"color-space\"" "$1"' sh {}

# 2) Locate DVColor mapping and check exact string used for "vault green".
fd 'DVColor.swift' Projects/DVDesign/Sources -t f \
  -x sh -c 'printf "\n== %s ==\n" "$1"; rg -n "vault green|gray100|gray200|gray400|gray700|gray800|gray900|Color\\(" "$1"' sh {}

Repository: DevaultProject/Devault-macOS

Length of output: 4764


Address color-space inconsistency for vault green.

This token uses srgb while all other new color tokens use display-p3, creating a visual inconsistency. DVColor correctly maps the asset name including the space, so token lookup works.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Projects/DVDesign/Resources/Assets.xcassets/color/vault`
green.colorset/Contents.json around lines 5 - 31, The Contents.json entry for
the "vault green" color asset uses "color-space" : "srgb" for both light and
dark appearances, causing a mismatch with other new tokens that use
"display-p3"; update the "color-space" fields in the vault green asset's
Contents.json (both appearance blocks under the "color" object) from "srgb" to
"display-p3" so it matches the project's color-space convention and preserves
correct rendering and token consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎨 Design UI 디자인 작업

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants