From 8173d4a8b2ca142609f7ea91a9630515aa7ffc94 Mon Sep 17 00:00:00 2001 From: Muhammad Saif Ullah Khan Date: Tue, 8 Feb 2022 18:27:41 +0100 Subject: [PATCH] Added color customization instructions in README --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7c61d4ff..62e44544 100644 --- a/README.md +++ b/README.md @@ -172,11 +172,13 @@ try { } catch(Exception e) { } +``` -No customization of the image is currently supported, including changing colors or padding. If you -require more customization, copy and modify the source for the encoder. +To customize the generated barcode image, use the `setBackgroundColor` and `setForegroundColor` functions of the +`BarcodeEncoder` class with a [`@ColorInt`](https://developer.android.com/reference/androidx/annotation/ColorInt) +value to update the background and foreground colors of the barcode respectively. By default, the barcode has a +white background and black foreground. -``` ### Changing the orientation