erwanvivien/fast_qr

Support for terminals with light backgrounds

Closed this issue · 6 comments

Thank you for your work!
I want to replace qrcode with your crate, Is it possible to implement like this for supports both dark and light colored terminals

    let code = QrCode::new("mow mow").unwrap();
    let image = code.render::<unicode::Dense1x2>()
        .dark_color(unicode::Dense1x2::Light)
        .light_color(unicode::Dense1x2::Dark)
        .build();
    println!("{}", image);

Hey, there currently is no support for that, I will work on that tomorrow, thanks for the report !

To add a bit more information to this issue, currently, the color is indeed set for dark and it is pretty bare-bone: https://github.com/erwanvivien/fast_qr/blob/master/src/helpers.rs#L31-L58

What customisation would you like to see ? Colors ? Module width ? Maybe it working on more terminals than Unix (would require an other crate) ?

in light backgrounds:

qrcode:
image

fast_qr:
image

Maybe needs to reverse the color

That I understand, do you need anything more ?

Thank you for your response, it was great for me

I removed the custom colors codes I had put, so it works by default, using the terminal default color