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 Lab format (to parser and output) #3

Closed
2 tasks done
sharkdp opened this issue Jun 15, 2019 · 6 comments
Closed
2 tasks done

Add Lab format (to parser and output) #3

sharkdp opened this issue Jun 15, 2019 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@sharkdp
Copy link
Owner

sharkdp commented Jun 15, 2019

  • input
  • output
@sharkdp sharkdp closed this as completed Aug 25, 2019
@shawnohare
Copy link

Is CIELab format parseable now? I notice only the output task has been checked. I was excited to use this tool, but pastel could not parse the CIELab format as of a fresh install yesterday.

@sharkdp sharkdp reopened this Sep 1, 2019
@sharkdp
Copy link
Owner Author

sharkdp commented Sep 1, 2019

The reason I closed this ticket is that conversion from Lab (to RGB) can be confusing because you can easily reach the edge of RGB space (fully saturated colors), because the sRGB gamut has such a weird shape in Lab space.

In any case, that's not really a reason not to implement this. We should add this.

This should be really straightforward to implement, as we already have Color::from_lab. It just needs a simple Regex in src/cli/parser.rs.

@sharkdp sharkdp added enhancement New feature or request good first issue Good for newcomers labels Sep 1, 2019
@saidsay-so
Copy link
Contributor

Hi!
I tried to parse this format but there isn't a string to distinguish them (like HSL() or RGB()) so I just use the prefix CEILab(). Is it good?

@sharkdp
Copy link
Owner Author

sharkdp commented Sep 30, 2019

@musikid Thank you for looking into this. I think it would be great if we could support both CIELab(…) (not CEI…) as well as Lab(…), case insensitive.

Regex could be something like (cie)?lab\(…

@saidsay-so
Copy link
Contributor

Oh yes, sorry! It's effectively CIELAB. And I think that the regex should be more like (?:cie)?lab\( because we don't need to capture this group.

sharkdp pushed a commit that referenced this issue Oct 2, 2019
@sharkdp sharkdp closed this as completed Oct 2, 2019
@sharkdp
Copy link
Owner Author

sharkdp commented Oct 2, 2019

closed via #101 by @musikid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants