Colorize any Part of the BarCode Image in Ruby

Aspose.BarCode - Colorize any Part of the Barcode Image

To Colorize any Part of the Barcode Image using Aspose.Barcode Java for Ruby, simply invoke SetBarcodeImageColor module. Here you can see example code.

Ruby Code

 data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'

\# Instantiate barcode object

bb = Rjb::import('com.aspose.barcode.BarCodeBuilder').new

color = Rjb::import('java.awt.Color')

\# Set the background color of the barcode


\# Set the foreground color of the barcode


\# Set border's color


\# Set the code text's color


\# Caption's color


bb.getCaptionBelow().setForeColor(color.CYAN) + "color.jpg")

\# Display Status.

puts "Applied color to barcode image, please check the output file."

Download Running Code

Download Colorize any Part of the Barcode Image (Aspose.BarCode) from any of the below mentioned social coding sites: