Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Fix mistake in Color#getRGB signature #26210

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

donmccurdy
Copy link
Collaborator

@donmccurdy donmccurdy commented Jun 7, 2023

The getRGB method returns colors in the working color space by default (Linear-sRGB), not sRGB.

three.js/src/math/Color.js

Lines 412 to 422 in 14ba689

getRGB( target, colorSpace = ColorManagement.workingColorSpace ) {
ColorManagement.fromWorkingColorSpace( _color.copy( this ), colorSpace );
target.r = _color.r;
target.g = _color.g;
target.b = _color.b;
return target;
}

@donmccurdy donmccurdy added this to the r154 milestone Jun 7, 2023
@Mugen87 Mugen87 merged commit 2b8f360 into mrdoob:dev Jun 7, 2023
@donmccurdy donmccurdy deleted the docs/color-getrgb-colorspace branch June 7, 2023 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants