Need option to make all eyes different colours
Closed this issue · 3 comments
hardikbhalodi commented
Is it possible to give different colours to eyes? right now colour applying to all eyes.
alexzhirkevich commented
Not possible at the moment and is not likely to be. Too colourful QR codes are hardly recognisable for scanners. Avoid doing it
alexzhirkevich commented
Will be possible after #35 with this code:
class DifferentColor() : QrVectorColor {
override val mode: QrPaintMode = QrPaintMode.Separate
override fun Paint.paint(width: Float, height: Float, neighbors : Neighbors) {
when {
neighbors.bottom & neighbors.right -> // top left eye
neighbors.bottomLeft -> top right eye
neighbors.topRight -> // bottom left eye
neighbors.topLeft -> // bottom right eye
}
}
}
alexzhirkevich commented
Available in 2.0.0-alpha01
with the code above