Adding Backgrounds to QR Codes
You can add background settings to a QR code. This includes the ability to specify a color, image, and a repeating pattern for the background image. Normally you would not see a QR code's background, but if you give the QR code a certain amount of padding, you would see the background around the edges of it.
This can be done through styles or by using local formatting. Using styles is usually recommended because the setting is automatically applied to any content using that style throughout the project, whereas local formatting affects only the particular content that you are working on.
[Menu Proxy — Headings — Online — Depth3 ]
How to Use a Style to Add a Background to QR Codes
- From the Content Explorer, open the stylesheet that you want to modify.
- In the local toolbar, make sure the first button displays
. If the button displays
instead, then click it.
- In the upper-left corner of the editor, click in the drop-down field and select
.
- Select the MadCap|qrCode style.
- From the Show drop-down list on the upper-right side of the editor, select
.
- If you are using the grouped view, expand the Background group.
- Locate the background property that you want to change.
To Set a Color for the Background
To the right of background-color, click
and select a color. For advanced color options, click
and use the fields in the Color Picker dialog, or click
to select a color already used elsewhere on your screen. You can use the Color Picker to select a CSS variable.
To Add an Image to the Background
- To the right of background-image, click
. The Insert Image dialog opens.
Select an image file to insert. You can do this in one of the following ways.
- Select an image already in the project by finding and selecting it in the built-in tree.
- Click
to find and select an image file outside of the project.
Note If you want to select an image file recently inserted into your project, click the down arrow in the field next to the
button, and select the file from the list.
- If you want the background image to repeat, click
to the right of background-repeat and select one of the options from the drop-down (definitions from http://www.w3.org).
- no-repeat The image is not repeated: only one copy of the image is drawn.
- repeat The image is repeated both horizontally and vertically.
- repeat-x The image is repeated horizontally only.
- repeat-y The image is repeated vertically only.
- To the right of background-image, click
- Click
to save your work.
How to Use Local Formatting to Add a Background to a QR Code
- Open the content file.
- Right-click on the QR code.
- From the drop-down list, select Edit QR Code. The Edit QR Code dialog opens.
- Select the Background tab.
- Use the tab to specify the settings that you want for the background.
To set a color for the background
- In the Color field, click the down arrow and select a color from the popup. For advanced color options, select More Colors and use the fields in the Color Picker dialog.
To add an image to the background
Next to the Image field, click the Browse button.
The Insert Image dialog opens.
- Select an image file to insert. You can do this in one of the following ways.
- Select an image already in the project by finding and selecting it in the built-in tree.
- Click
to find and select an image file outside of the project.
- If you want the background image to repeat, select one of the options from the Repeat field. You can also set the image position horizontally and vertically by using the X and Y fields.
- Click OK.
Note If you want to select an image file recently inserted into your project, click the down arrow in the field next to the
button, and select the file from the list.
- In the other dialog, click OK.
- Click
to save your work.