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

ColorSequence forces results to be in SRGB color space #186

Open
shi-weili opened this issue Jun 10, 2021 · 0 comments
Open

ColorSequence forces results to be in SRGB color space #186

shi-weili opened this issue Jun 10, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@shi-weili
Copy link

shi-weili commented Jun 10, 2021

Currently, all colors will be converted to SRGB before being returned. However, the default linearity of an RGBa color is UNKNOWN:

https://github.com/openrndr/openrndr/blob/563c1cd36ad4b65399ccfaee7928013ef99289ab/openrndr-color/src/main/kotlin/org/openrndr/color/ColorRGBa.kt#L30

So if the user defines two RGBa colors without specifying linearity, and then blend them, the resulting sequence will have unequal distances, because ColorRGBa.toSRGB() will treat UNKNOWN inputs as if they are LINEAR:

https://github.com/openrndr/openrndr/blob/563c1cd36ad4b65399ccfaee7928013ef99289ab/openrndr-color/src/main/kotlin/org/openrndr/color/ColorRGBa.kt#L228

This is unintuitive. Maybe either make the default linearity of ColorRGBa SRGB (like the predefined colors), or don't force the ColorSequence outputs in SRGB to avoid confusion?

@edwinRNDR edwinRNDR self-assigned this Jun 18, 2021
@edwinRNDR edwinRNDR added the bug Something isn't working label Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants