Skip to content

fix: Use sRGB color space for IFC material colors#135

Merged
agviegas merged 1 commit into
ThatOpen:mainfrom
demattosanthony:fix/ifc-color-rendering
Jan 16, 2026
Merged

fix: Use sRGB color space for IFC material colors#135
agviegas merged 1 commit into
ThatOpen:mainfrom
demattosanthony:fix/ifc-color-rendering

Conversation

@demattosanthony
Copy link
Copy Markdown
Contributor

Description

IFC material colors are stored in sRGB color space, but were being passed directly to THREE.Color() which treats input values as linear RGB in Three.js r152+.

This caused colors to appear washed out - dark greys appeared lighter, and colors lost saturation because sRGB values were incorrectly interpreted as linear.

The fix uses THREE.Color().setRGB(r, g, b, THREE.SRGBColorSpace) to properly convert from sRGB to linear color space internally.


What is the purpose of this pull request?

  • [ X ] Bug fix
  • New Feature
  • Documentation update
  • Other

@agviegas
Copy link
Copy Markdown
Contributor

Thanks for this! We'll review it and, if everything is ok, merge asap :)

@agviegas agviegas merged commit b34fc77 into ThatOpen:main Jan 16, 2026
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.

2 participants