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

Transparent background? #63

Closed
timmyomahony opened this issue Oct 30, 2016 · 3 comments · Fixed by #64
Closed

Transparent background? #63

timmyomahony opened this issue Oct 30, 2016 · 3 comments · Fixed by #64
Assignees
Milestone

Comments

@timmyomahony
Copy link

timmyomahony commented Oct 30, 2016

Is it possible to have a transparent background? I tried

const qr = new QRious({
  element: ...,
  foreground: '#1a1a1a',
  background: 'transparent',  // also tried null and undefined
  value: 'https://github.com/neocotic/qrious',
  size: 500
});

but it doesn't work.

@neocotic neocotic added this to the 2.2.0 milestone Oct 30, 2016
@neocotic neocotic self-assigned this Oct 30, 2016
@neocotic
Copy link
Owner

Not currently supported but let's change that :)

I'm going to add 2 new options; backgroundAlpha and foregroundAlpha, both of which will default to 1.0. The values can range between 0 and 1. So, for your example;

const qr = new QRious({
  element: ...,
  foreground: '#1a1a1a',
  backgroundAlpha: 0,
  value: 'https://github.com/neocotic/qrious',
  size: 500
});

@neocotic
Copy link
Owner

@timmyomahony Please upgrade to v2.2.0 and let me know how you get on with these new options.

@timmyomahony
Copy link
Author

Amazing. Thanks for the quick reply. Just updated and it works perfectly.

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

Successfully merging a pull request may close this issue.

2 participants