//qrcode-kotlin/qrcode.color/DefaultColorFunction

DefaultColorFunction

[common]
open class DefaultColorFunction(foreground: Int = Colors.BLACK, background: Int = Colors.WHITE) : QRCodeColorFunction

Default function for the QRCode cell color. Returns a color for the foreground ("dark") and another for the background and margin.

The default colors is Colors.BLACK for the foreground and Colors.WHITE for the background.

Constructors

   
DefaultColorFunction [common]
constructor(foreground: Int = Colors.BLACK, background: Int = Colors.WHITE)

Functions

Name Summary
beforeRender [common]
open fun beforeRender(qrCode: QRCode, qrCodeGraphics: QRCodeGraphics)
Called before rendering starts, to setup something if needed
bg [common]
open override fun bg(row: Int, col: Int, qrCode: QRCode, qrCodeGraphics: QRCodeGraphics): Int
What is the background color
colorFn [common]
open fun colorFn(square: QRCodeSquare, qrCode: QRCode, qrCodeGraphics: QRCodeGraphics): Int
fg [common]
open override fun fg(row: Int, col: Int, qrCode: QRCode, qrCodeGraphics: QRCodeGraphics): Int
What is the foreground color
margin [common]
open override fun margin(row: Int, col: Int, qrCode: QRCode, qrCodeGraphics: QRCodeGraphics): Int
What is the margin color. Defaults to bg