Transparent background? #63

Closed
timmyomahony opened this Issue Oct 30, 2016 · 3 comments

Projects

None yet

2 participants

@timmyomahony
timmyomahony commented Oct 30, 2016 edited

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
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 neocotic referenced this issue Oct 30, 2016
Merged

2.2.0 WIP #64

1 of 1 task complete
@neocotic neocotic closed this in #64 Oct 30, 2016
@neocotic
Owner

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

@timmyomahony

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