Skip to content

Commit 8173d4a

Browse files
authored
Added color customization instructions in README
1 parent 8fdbbbe commit 8173d4a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,13 @@ try {
172172
} catch(Exception e) {
173173

174174
}
175+
```
175176

176-
No customization of the image is currently supported, including changing colors or padding. If you
177-
require more customization, copy and modify the source for the encoder.
177+
To customize the generated barcode image, use the `setBackgroundColor` and `setForegroundColor` functions of the
178+
`BarcodeEncoder` class with a [`@ColorInt`](https://developer.android.com/reference/androidx/annotation/ColorInt)
179+
value to update the background and foreground colors of the barcode respectively. By default, the barcode has a
180+
white background and black foreground.
178181

179-
```
180182

181183
### Changing the orientation
182184

0 commit comments

Comments
 (0)