Correct WaveformContainer coral to the design palette#18
Conversation
WaveformContainer sourced its accent from WaveformPalette.accent, a pre-existing token set to (0.85, 0.45, 0.40) — bluer than the design's coral #D9734D (0.85, 0.45, 0.30). This affected the recording window's listening glow, recording dot, and error glyph. The waveform renderers, dashboard, welcome, and menu bar already used the correct coral; this aligns the container chrome with them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe PR updates the classic waveform color palette by adjusting the accent color's blue component from 0.40 to 0.30, and adds documentation identifying the color as the app's coral tone ( ChangesWaveform Color Theme
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@Sources/Views/Components/Waveform/ColorTheme.swift`:
- Line 149: Replace the five hardcoded coral color instances (old RGB 0.85,
0.45, 0.40) with the centralized palette value WaveformPalette.accent (which
uses RGB 0.85, 0.45, 0.30) so all components use the same color; specifically,
update the color literals in StateTransitionFlashTests (test at line around the
flash color), WaveformView (the accent color usage), and StateTransitionEffects
(the three effect color usages around the 204, 323, 341 areas) to reference
WaveformPalette.accent instead of hardcoded Color(...) and remove the duplicated
literal values.
🪄 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: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: fd5a5ec4-d70d-4979-b841-22ff6ba350e6
📒 Files selected for processing (1)
Sources/Views/Components/Waveform/ColorTheme.swift
| Color(red: 0.35, green: 0.34, blue: 0.33), | ||
| Color(red: 0.45, green: 0.75, blue: 0.55), | ||
| Color(red: 0.85, green: 0.45, blue: 0.40) | ||
| Color(red: 0.85, green: 0.45, blue: 0.30) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
echo "=== Verifying `#D9734D` → RGB conversion ==="
python3 << 'PYTHON_EOF'
# Convert `#D9734D` to normalized RGB
hex_color = "D9734D"
r = int(hex_color[0:2], 16) / 255.0
g = int(hex_color[2:4], 16) / 255.0
b = int(hex_color[4:6], 16) / 255.0
print(f"Hex `#D9734D` converts to:")
print(f" Red: {r:.10f} (rounds to 0.85)")
print(f" Green: {g:.10f} (rounds to 0.45)")
print(f" Blue: {b:.10f} (rounds to 0.30)")
print()
# Check if (0.85, 0.45, 0.30) is the best two-decimal approximation
if round(r, 2) == 0.85 and round(g, 2) == 0.45 and round(b, 2) == 0.30:
print("✓ RGB (0.85, 0.45, 0.30) is correct for `#D9734D`")
else:
print(f"✗ Expected ({round(r, 2)}, {round(g, 2)}, {round(b, 2)})")
PYTHON_EOF
echo ""
echo "=== Searching for old coral color (0.85, 0.45, 0.40) ==="
rg -n --type=swift "0\.85.*0\.45.*0\.40" || echo "✓ No instances of old color found"Repository: jtn0123/AudioWhisper
Length of output: 1002
Update 5 remaining instances of the old coral color and centralize color definitions.
The hex-to-RGB conversion for #D9734D is correct: RGB (0.85, 0.45, 0.30) accurately represents the target color. However, the old coral color (0.85, 0.45, 0.40) remains hardcoded in 5 locations:
- Tests/Views/Components/Effects/StateTransitionFlashTests.swift:45
- Sources/Views/Components/WaveformView.swift:18
- Sources/Views/Components/Effects/StateTransitionEffects.swift:204, 323, 341
These must be updated to use the new value (0.85, 0.45, 0.30) for consistency. Better yet, refactor to use WaveformPalette.accent instead of hardcoding colors in multiple files.
🤖 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 `@Sources/Views/Components/Waveform/ColorTheme.swift` at line 149, Replace the
five hardcoded coral color instances (old RGB 0.85, 0.45, 0.40) with the
centralized palette value WaveformPalette.accent (which uses RGB 0.85, 0.45,
0.30) so all components use the same color; specifically, update the color
literals in StateTransitionFlashTests (test at line around the flash color),
WaveformView (the accent color usage), and StateTransitionEffects (the three
effect color usages around the 204, 323, 341 areas) to reference
WaveformPalette.accent instead of hardcoded Color(...) and remove the duplicated
literal values.
|



Summary
Follow-up to #17.
WaveformContainersourced its accent color fromWaveformPalette.accent, a pre-existing token set to(0.85, 0.45, 0.40)— bluer/peachier than the design's coral#D9734D=(0.85, 0.45, 0.30).This affected the recording window's "LISTENING" glow, the recording dot, and the error glyph. The 8 waveform renderers, the dashboard, the welcome screen, and the menu bar already used the correct coral — this brings the container chrome into line with them.
Found during a spec-level audit of the implementation against the prototype's source colors.
Test plan
swift buildcleanswiftlint --strictclean (one-line color literal change)🤖 Generated with Claude Code
Summary by CodeRabbit