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

[css-typed-om] Fill out TODO in toColor(colorspace) #1031

Closed
svgeesus opened this issue May 11, 2021 · 5 comments
Closed

[css-typed-om] Fill out TODO in toColor(colorspace) #1031

svgeesus opened this issue May 11, 2021 · 5 comments

Comments

@svgeesus
Copy link
Contributor

In 4.6 CSSColorValue objects, the toColor(colorspace) method states:

  1. Convert this into a color in the colorspace specified by colorspace, and return a new CSSColor object with TODO.

This should be expanded out, at least to the basic level of detail of the other toFoo methods on the same object.

Suggested minimal text (still lacking references to how to actually do this):

into a color in the specified colorspace, and return a new CSSColor object with its colorspace, parameter values, and alpha internal slots set appropriately to represent that color.

@svgeesus
Copy link
Contributor Author

I added a new Converting between predefined RGB color spaces section to CSS Color 4, because expecting people to concatenate
"Converting predefined color spaces to Lab" and "Converting Lab to predefined color spaces" while dropping the redundant steps is maybe a bit much (bad Chris)

w3c/csswg-drafts@9bfab91

So that would be a suitable reference for the conversion here.

@tabatkins
Copy link
Member

That was a TODO because the structure was still a little uncertain at the time; now that we've dropped a lot of the complexity I fixed up the class definition, and that TODO can be filled in properly now.

@svgeesus
Copy link
Contributor Author

svgeesus commented May 13, 2021

Where is the fixed-up definition? Type OM has only one commit in 2021, in January.

@tabatkins
Copy link
Member

ARGH MY LOCAL REPO WAS STILL PUSHING TO MASTER

Sorry, fixed, main is updated and pushed now.

@svgeesus
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants