Skip to content

Render soldermask colors consistently across PCB surfaces and edges - #984

Merged
AnasSarkiz merged 3 commits into
tscircuit:mainfrom
AnasSarkiz:AnasSarkiz/soldermask-colors
Aug 24, 2026
Merged

Render soldermask colors consistently across PCB surfaces and edges#984
AnasSarkiz merged 3 commits into
tscircuit:mainfrom
AnasSarkiz:AnasSarkiz/soldermask-colors

Conversation

@AnasSarkiz

@AnasSarkiz AnasSarkiz commented Aug 20, 2026

Copy link
Copy Markdown
Member

Summary

  • refine the documented soldermask presets with calibrated surface colors, per-color opacity, and mask-over-copper compositing while preserving the existing green/default material appearance
  • preserve valid Three-supported CSS custom colors and safely retain legacy rendering for unsupported tokens without color-parser warnings
  • apply the selected color to both board faces and board edges across the Manifold and JSCAD renderers, including panels, while retaining the existing FR4 physical material
  • keep SVG board selection aligned with the rendered panel board
  • add focused palette, relief, edge, panel, and SVG regressions plus Storybook examples that reuse the existing complex-board fixture; no new Circuit JSON asset is added

Circuit JSON behavior

Circuit JSON exposes one optional solder_mask_color string per pcb_board, so the viewer applies it to both board faces. Missing, green, and not_specified values retain the existing material-specific green rendering. Documented presets use calibrated rendering, valid custom CSS colors are supported, and unsupported namespaced strings fall back to the legacy material color.

Validation

Story Link https://3d-viewer-git-fork-anassarkiz-anassarkiz-solde-29e761-tscircuit.vercel.app/?path=/story/soldermask-colors-examples--green

Visaual

Screenshot 2026-08-23 at 2 05 24 PM Screenshot 2026-08-23 at 2 05 57 PM Screenshot 2026-08-23 at 2 06 14 PM Screenshot 2026-08-23 at 2 06 28 PM Screenshot 2026-08-23 at 2 07 45 PM Screenshot 2026-08-23 at 2 08 00 PM Screenshot 2026-08-23 at 2 16 39 PM

@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
3d-viewer Ready Ready Preview Aug 23, 2026 1:13pm

Request Review

@AnasSarkiz AnasSarkiz changed the title Support soldermask colors Support soldermask color presets Aug 23, 2026
@AnasSarkiz AnasSarkiz changed the title Support soldermask color presets Refine soldermask color rendering Aug 23, 2026
@AnasSarkiz
AnasSarkiz marked this pull request as ready for review August 23, 2026 13:14
@AnasSarkiz AnasSarkiz changed the title Refine soldermask color rendering Render soldermask colors consistently across PCB surfaces and edges Aug 23, 2026
@AnasSarkiz
AnasSarkiz merged commit ea47663 into tscircuit:main Aug 24, 2026
5 checks passed
@tscircuitbot

Copy link
Copy Markdown

Thank you for your contribution! 🎉

PR Rating: ⭐⭐
Impact: Minor

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


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.

3 participants