Skip to content

Correct WaveformContainer coral to the design palette#18

Merged
jtn0123 merged 1 commit into
masterfrom
coral-palette-fix
May 16, 2026
Merged

Correct WaveformContainer coral to the design palette#18
jtn0123 merged 1 commit into
masterfrom
coral-palette-fix

Conversation

@jtn0123
Copy link
Copy Markdown
Owner

@jtn0123 jtn0123 commented May 15, 2026

Summary

Follow-up to #17. WaveformContainer sourced its accent color from WaveformPalette.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 build clean
  • Waveform tests pass (113, 0 failures)
  • swiftlint --strict clean (one-line color literal change)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Style
    • Refined the waveform visualization color palette with an adjusted accent color tone for improved visual appearance.

Review Change Stack

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>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

📝 Walkthrough

Walkthrough

The 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 (#D9734D).

Changes

Waveform Color Theme

Layer / File(s) Summary
Classic palette accent color refinement
Sources/Views/Components/Waveform/ColorTheme.swift
The fifth color in WaveformPalette.classic array updated with a lower blue component (0.30 instead of 0.40), and an inline comment documents the accent color as coral #D9734D.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A touch of coral, ever true,
Blue adjusted from point four to three,
Waveforms painted in softer hue,
Comments guiding what all shall see,
#D9734D marks the brand's decree! 🎨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: correcting a color value in the WaveformContainer to match the design palette specification.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch coral-palette-fix

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: 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

📥 Commits

Reviewing files that changed from the base of the PR and between f1db9f8 and e4dea5b.

📒 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)
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 | 🟠 Major | ⚡ Quick win

🧩 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.

@sonarqubecloud
Copy link
Copy Markdown

@jtn0123 jtn0123 merged commit 3ba4e1c into master May 16, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant