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

Unable to parse background colors #86

Open
retrocausal opened this issue Mar 2, 2018 · 1 comment
Open

Unable to parse background colors #86

retrocausal opened this issue Mar 2, 2018 · 1 comment

Comments

@retrocausal
Copy link

retrocausal commented Mar 2, 2018

Error: Unable to parse color from object: {"model":"rgb","color":[255,255,255],"valpha":1}

What does the config specify:

const bgcolor = color({
  r: 255,
  g: 255,
  b: 255,
  alpha: 0
});
//Somewhere in the pipeline
//common config parameters
{
      min: true,
      flatten: true,
      background: bgcolor
}

The above error, is regardless of specifying the alpha channel while defining a color.
I am unsure if this is because of sharp though

@retrocausal
Copy link
Author

Oh I figured, I should not be using color, but only specify the color model

doing

{
background:{r:255,b:255,g:255,alpha:0}
}

doesn't throw an error anymore. However, the alpha just doesn't work.

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

No branches or pull requests

1 participant