p2plabsxyz / dscan

A decentralized storage and file-sharing tool that uploads content to IPFS and generates decentralized QR codes.
https://chromewebstore.google.com/detail/dscan-own-your-identity-o/idpfgkgogjjgklefnkjdpghkifbjenap
MIT License
36 stars 26 forks source link

feat: colour customisation for QR codes #29

Closed akhileshthite closed 1 year ago

akhileshthite commented 1 year ago

A colour bar or an input box appears with QR code for customisations.

Screenshot 2022-10-07 at 2 30 11 PM

Files:

Colour input: https://github.com/buidltools/dscan/blob/adaa07878bfef9216f43e0656736e4570af68593/src/js/qrcode.js#L12

HTML: For file: https://github.com/buidltools/dscan/blob/main/src/popup.html For folder: https://github.com/buidltools/dscan/blob/main/src/folderUpload.html

CSS: https://github.com/buidltools/dscan/blob/main/src/css/popup.css

JS: https://github.com/buidltools/dscan/blob/main/src/js/qrcode.js

For development setup and contribution guide, check the main README.md.

g1mishra commented 1 year ago

Hii @akhileshthite I would love to work on this.

Please align with me.

akhileshthite commented 1 year ago

Hii @akhileshthite I would love to work on this.

Please align with me.

Sure :D Go ahead.

g1mishra commented 1 year ago

16652232896455485673617503312779

It was done. PR was raised, please check and merge.

Thanks

akhileshthite commented 1 year ago

16652232896455485673617503312779

It was done. PR was raised, please check and merge.

Thanks

Just tested, It looks amazing! 🔥 Can you do same thing for white colour? There would be two bars side-by-side (white one on left and black one on right). Screenshot 2022-10-08 at 5 37 14 PM

g1mishra commented 1 year ago

Okay @akhileshthite

g1mishra commented 1 year ago

@akhileshthite, I have added a color picker for white color but having an issue with color contrast, and the google scanner is not able to scan properly.

What's your thought on this?

akhileshthite commented 1 year ago

@akhileshthite, I have added a color picker for white color but having an issue with color contrast, and the google scanner is not able to scan properly.

What's your thought on this?

Okay, I think it's because of the colour combination right?

Push it on different branch let me test.

g1mishra commented 1 year ago

Yes @akhileshthite

Okay, I will push.

After searching on google for a few minutes, I found that the contrast should be 4:1 for the QR code.

akhileshthite commented 1 year ago

Yes @akhileshthite

Okay, I will push.

After searching on google for a few minutes, I found that the contrast should be 4:1 for the QR code.

Okay

g1mishra commented 1 year ago

@akhileshthite I was not able to create a branch in this repo. So I created it in my forked repo.

Here is the branch: https://github.com/g1mishra/dscan/tree/_feature/qr_colorpicker

akhileshthite commented 1 year ago

@akhileshthite, I have added a color picker for white color but having an issue with color contrast, and the google scanner is not able to scan properly.

What's your thought on this?

Just tested. It works. You mean with dark colour backgrounds your scanner is having difficulty?

If you're getting "504 Gateway Time-out" error or dealing with long loading time after scanning, then no worries. It's just the dweb.link gateway issue.

g1mishra commented 1 year ago

Yes @akhileshthite if you choose both colour almost similar. Scanner having difficulty.

So, should I add latest changes as well in the current PR?

akhileshthite commented 1 year ago

Yes @akhileshthite if you choose both colour almost similar. Scanner having difficulty.

So, should I add latest changes as well in the current PR?

Yes. Do the following changes:

Untitled 001

g1mishra commented 1 year ago

@akhileshthite Done :)