Skip to content

Conversation

@donmccurdy
Copy link
Collaborator

@donmccurdy donmccurdy commented Apr 17, 2023

Enables the THREE.ColorManagement API by default. As described in the color management guide, hexadecimal and CSS-style colors are now interpreted as sRGB, and converted automatically to the working color space (Linear sRGB). The change allows developers to use three.js color APIs more like CSS and HTML color APIs (both sRGB), while still rendering in a linear color space.

This change targets r152+, because it greatly reduces the migration burden of using renderer.outputColorSpace = SRGBColorSpace, enabled in #25783.

Related:

@donmccurdy donmccurdy added this to the r152 milestone Apr 17, 2023
@github-actions
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
633.9 kB (157.1 kB) 633.9 kB (157.1 kB) +0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Filesize dev Filesize PR Diff
425.1 kB (103 kB) 425.1 kB (103 kB) +0 B

@Mugen87 Mugen87 merged commit e284aee into mrdoob:dev Apr 17, 2023
@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 17, 2023

Similar to renderer.outputColorSpace = THREE.SRGBColorSpace it would be good to delete all occasions of THREE.ColorManagement.enabled = true; now (see #23614 (comment)).

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