Skip to main content
All CollectionsWeb CheckoutManuals
How to Set Checkout Colours
How to Set Checkout Colours

Customise your web checkout colours to match each of your brands.

Lucia Burin Sestakova avatar
Written by Lucia Burin Sestakova
Updated over a month ago

Ventrata Checkout offers two basic colour modes - LIGHT (default) and DARK.

To choose the colour mode for your web checkout, use the "defaultTheme" attribute in your data-config.

LIGHT mode is the default mode. By adding the "theme" attribute to your data-config, you can customise the colour of button borders, selected elements and certain icons.

πŸ“’ NOTE

Define colours in HEX format, such as #FFFFFF for white.

data-config='{"productID":"XXX", "apiKey":"XXX", "theme": "#6FD316" }’

To change or specify the mode, add the "defaultTheme" attribute to your data-config.

LIGHT mode

data-config='{"productID":"XXX", "apiKey":"XXX", "defaultTheme": "light" }’

DARK mode

data-config='{"productID":"XXX", "apiKey":"XXX", "defaultTheme": "dark" }’


Complex Settings

While for simple theme definition, modifying the data-config is sufficient, for more advanced colour customisation, configure more complex settings for each mode as a JavaScript object:

{
defaultTheme: "dark", // only "light" and "dark"
theme: {
light: {
"theme-color": "#ffffff", // color of the background
primary: "#F11D46",
"text-primary": "#000000",
"text-secondary": "#767676",
"text-disabled": "#C2C2C2",
"gradient-A": "#A41256", // composite color for hover/active/focus effects on button
"gradient-B": "#5E0864", // composite color for hover/active/focus effects on button
backdropOpacity: "0.25", // adjust backdrop opacity (values between 0-1)
},
dark: {
"theme-color": "#1c1c1c", // color of the background
primary: "#f84b4b",
"text-primary": "#ffffff",
"text-secondary": "#D1D1D1",
"text-disabled": "#6b6b6b",
"gradient-A": "#c4005d", // composite color for hover/active/focus effects on button
"gradient-B": "#8c1a8c", // composite color for hover/active/focus effects on button
backdropOpacity: "0.75", // adjust backdrop opacity (values between 0-1)
},
}
}

Attribute

Description

"theme-color"

the background colour

primary

the colour of button borders, selected elements and certain icons

"text-primary"

the colour of key checkout elements, including product and unit titles, and dates

"text-secondary"

the colour of secondary elements, like product and unit descriptions, and prices

"text-disabled"

the colour used for sold-out dates or dates in the past

"gradient-A"

the starting colour for the gradient effect on buttons when hovered

"gradient-B"

the ending colour for the gradient effect on buttons when hovered

"backdropOpacity"

if your checkout appears as a pop-up, this setting defines the opacity of the page behind the checkout

Did this answer your question?