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

Add support for Float RGB #57

Closed
quinton-ashley opened this issue Jul 12, 2024 · 0 comments
Closed

Add support for Float RGB #57

quinton-ashley opened this issue Jul 12, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@quinton-ashley
Copy link
Collaborator

quinton-ashley commented Jul 12, 2024

In CSS color(srgb ...) and color(display-p3 ...) use the new float (0-1) rgb format.

I think the legacy 8-bit (0-255), integer rgb format should remain the default for the q2d renderer, but for the upcoming webgpu renderer the float rgb format should be the default, since it's also the default color format for all of webgpu's color formats, regardless of color space.

The updated colorMode(mode, colorFormat) function will take two params: a mode ('rgb', 'srgb', or 'oklch') and a colorFormat ('integer' or 'float').

colorMode('rgb', 'float');

The current integer RGBA color classes will be renamed:

ColorRGBA_8
ColorRGBA_P3_8

The float color classes will be named:

ColorRGBA
ColorRGBA_P3

@quinton-ashley quinton-ashley self-assigned this Jul 13, 2024
@quinton-ashley quinton-ashley added the enhancement New feature or request label Jul 13, 2024
@quinton-ashley quinton-ashley added this to the WebGPU milestone Jul 13, 2024
@quinton-ashley quinton-ashley moved this to In Progress in q5 Jul 15, 2024
@quinton-ashley quinton-ashley moved this from In Progress to Done in q5 Jul 25, 2024
@quinton-ashley quinton-ashley closed this as completed by moving to Done in q5 Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

1 participant