Skip to content

fix(schematic): make SCHEMATIC_COMPONENT_OUTLINE_COLOR portable SVG color (#3982) - #4010

Open
PINYOPATTANAWASANPORN wants to merge 1 commit into
tscircuit:mainfrom
PINYOPATTANAWASANPORN:fix/schematic-component-outline-color-portable-svg-3982
Open

PINYOPATTANAWASANPORN wants to merge 1 commit into
tscircuit:mainfrom
PINYOPATTANAWASANPORN:fix/schematic-component-outline-color-portable-svg-3982

Conversation

@PINYOPATTANAWASANPORN

Copy link
Copy Markdown

Summary of Changes

  • Replaces 3-argument rgba(132, 0, 0) with standard rgb(132, 0, 0) in SCHEMATIC_COMPONENT_OUTLINE_COLOR.

Root Cause / Technical Context

Fixes #3982. In lib/utils/constants.ts, SCHEMATIC_COMPONENT_OUTLINE_COLOR was defined as "rgba(132, 0, 0)".
While 3-argument rgba() is supported in modern browsers under CSS Color Level 4, it is invalid under SVG 1.1 / CSS2 color specifications.
Strict SVG consumers and renderers (such as CairoSVG or downstream conversion pipelines) fail when parsing generated schematic SVGs containing this color string.

Replacing it with "rgb(132, 0, 0)" produces the exact same color value while remaining compliant with all SVG and CSS specifications.

Verification & Testing

  • Verified SCHEMATIC_COMPONENT_OUTLINE_COLOR constant exports valid SVG color string rgb(132, 0, 0).
  • No visual or bounding box regressions introduced.

…olor (tscircuit#3982)

Replaces 3-argument 'rgba(132, 0, 0)' with standard 'rgb(132, 0, 0)'.
3-argument rgba() is only valid in CSS Color Level 4 and causes strict
SVG parsers/renderers (such as CairoSVG) to fail on generated schematic SVGs.
@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
tscircuit-core-benchmarks Ready Ready Preview Sep 18, 2026 10:38am UTC

Request Review

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.

SCHEMATIC_COMPONENT_OUTLINE_COLOR "rgba(132, 0, 0)" is not portable SVG color; strict SVG renderers reject schematic output

1 participant