Select your printer model

Parameters are refined by the selected printer.

addBackgroundColor method


Adds the specification of the background color to the command buffer.

The background color from the beginning till the end of the row specified in the text area can be changed.

Syntax

 
addBackgroundColor(row, r, g, b);

Parameter

row

Value

Description

Integer value from 1 to 19

Changes the background color of the specified row.

EVEN_ROWS

Changes the background color of all even rows.

ODD_ROWS

Changes the background color of all odd rows.

ALL_ROWS

Changes the background color of all rows.

r

Value

Description

Integer value from 0 to 255

Specifies the red color value of the background color.

g

Value

Description

Integer value from 0 to 255

Specifies the green color value of the background color.

b

Value

Description

Integer value from 0 to 255

Specifies the blue color value of the background color.

Return value

Return value

Object type

Display object

Display

Exception

Return value

Object type

Parameter " ... " is invalid

Error

Supplementary explanation

  • The background color can be applied only to the text area.
  • Specify the r, g, b parameters in the RGB565 format.
  • Specify the setting value in all of the r, g, and b parameters.
  • To apply the background color to a plurality of rows, execute this API a plurality of times.
  • To individually specify the background color in a plurality of windows, define the window in setCurrentTextArea method before executing this API.
    If the window is defined beforehand, the background color can be specified individually for each window.
    By dividing the window at the position where the background color is to be changed, the background color can be changed in the middle of the row.
 

Quick Access

  • [Name]
  • [Format]
  • [Range]
  • [Description]
  • [Notes]

Epson ePOS SDK includes patented or patent pending functions. The contents must not be disclosed to third parties.


Epson ePOS SDK for JavaScript

Jump to the top