Skip to content

feat(remotion): pass optional leftColor/rightColor to ComparisonCard - #969

Open
Sidh01581 wants to merge 1 commit into
OpenMontageInc:mainfrom
Sidh01581:feat/comparison-card-colors
Open

Sidh01581 wants to merge 1 commit into
OpenMontageInc:mainfrom
Sidh01581:feat/comparison-card-colors

Conversation

@Sidh01581

Copy link
Copy Markdown

Summary

ComparisonCard already accepts leftColor / rightColor props, but the Explainer dispatcher never forwarded them, so every comparison cut rendered with the component's hard-coded defaults (blue #2563EB / green #10B981) regardless of the video's palette.

This adds two optional fields to the Cut interface and passes them through to ComparisonCard.

leftColor?: string;  // optional value colors; ComparisonCard defaults apply when omitted
rightColor?: string;

Why

The fixed defaults can carry the wrong meaning. Example: a "decades that lost ground after inflation" card showed two negative returns (−1.3%/yr, −3.4%/yr) in blue and green, which reads as positive. With this change the edit can set them to the video's warning color.

Compatibility

  • Both fields are optional. When omitted they are undefined, so ComparisonCard's destructuring defaults still apply. Existing compositions render exactly as before.
  • No changes to ComparisonCard itself, other components, or the Python side.

Testing

  • Rendered stills and a full 1080p Explainer render with comparison cuts that set leftColor / rightColor. The colors applied as expected.
  • Comparison cuts without the new fields kept the default blue/green.

🤖 Generated with Claude Code

ComparisonCard already accepted value colors, but the Explainer dispatcher
never forwarded them, so comparison cuts always used the default blue/green.
Add optional leftColor/rightColor to the Cut interface and pass them through.
Omitted values keep the component defaults, so existing compositions are
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Sidh01581
Sidh01581 requested a review from calesthio as a code owner November 21, 2026 08:55
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