java-totp icon indicating copy to clipboard operation
java-totp copied to clipboard

Feature Request: Configurable QR Code color

Open timbru31 opened this issue 5 years ago • 1 comments

It would be a great addition to allow users to create a different colored QR codes - this is especially useful if you plan to show the code in dark mode for instance and want to invert the colors.

From looking at the code, it seems the used MatrixToImageWriter supports passing in a custom MatrixToImageConfig object, which defines the ON and OFF colors used to create the image. See https://zxing.github.io/zxing/apidocs/com/google/zxing/client/j2se/MatrixToImageWriter.html#writeToStream-com.google.zxing.common.BitMatrix-java.lang.String-java.io.OutputStream-com.google.zxing.client.j2se.MatrixToImageConfig- and https://zxing.github.io/zxing/apidocs/com/google/zxing/client/j2se/MatrixToImageConfig.html

timbru31 avatar Jan 29 '21 12:01 timbru31

(Yes I know I could just create a custom ZxingPngQrGenerator like class to change things)

timbru31 avatar Jan 29 '21 12:01 timbru31