Skip to content

feat(Port): pass highlightColor from pinAttributes to pcb_port#1900

Open
bimakw wants to merge 1 commit intotscircuit:mainfrom
bimakw:feat/pinout-highlight-color-v2
Open

feat(Port): pass highlightColor from pinAttributes to pcb_port#1900
bimakw wants to merge 1 commit intotscircuit:mainfrom
bimakw:feat/pinout-highlight-color-v2

Conversation

@bimakw
Copy link

@bimakw bimakw commented Feb 4, 2026

Summary

This PR enables the highlightColor feature for pinout diagrams by passing the color value from pinAttributes to pcb_port:

  • Add _getPinoutHighlightColor() method: Reads highlightColor from pinAttributes configuration
  • Include highlight_color in pcb_port: Pass the color value during both initial and update renders

Test Plan

  • TypeScript type check passes
  • Tested with circuit-to-svg to verify color rendering

Related

Usage Example

<chip
  name="U1"
  footprint="soic8"
  pinLabels={{ pin1: "VCC", pin2: "GND" }}
  pinAttributes={{
    VCC: { includeInBoardPinout: true, highlightColor: "#ff0000" },
    GND: { includeInBoardPinout: true, highlightColor: "#00ff00" },
  }}
/>

- Add _getPinoutHighlightColor() method to read highlightColor from pinAttributes
- Include highlight_color in pcb_port during both initial and update renders
- Enables custom colors for pinout diagram labels via pinAttributes

Part of tscircuit/tscircuit#895
@vercel
Copy link

vercel bot commented Feb 4, 2026

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

Project Deployment Actions Updated (UTC)
tscircuit-core-benchmarks Ready Ready Preview, Comment Feb 4, 2026 7:27am

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.

1 participant