🎨 Customising theme using query parameters

We’ve introduced three new query parameters β€” backgroundColors,textColors, and borderColors to provide you with granular control over the UI, enabling precise customisation to match your application's theme. These parameters ensure a consistent integration with your branding and design preferences.

Overview

ParameterDescription
backgroundColorsControls the background colours of key UI elements. Pass 3 hex colour codes as a string.
textColorsAdjusts the text colours across the application. Pass 3 hex colour codes as a string.
borderColorsCustomises the border colours for UI elements. Pass 3 hex colour codes as a string.

πŸ“˜

Note:

  • These query parameters only work when colorMode is provided, and its value can be either DARK or LIGHT.
  • Use the themeColorparameter to set the primary button colour with the HEX code (FFFFFF or FFF).
  • URL encode each color when passing multiple values for backgroundColors, textColors, or borderColors (e.g., borderColors=%23C88A4A,%23B97B3C,%23F3C68D).

Breakdown

1. backgroundColors

Pass a string containing 3 hex color codes(e.g., #RRGGBB or #RGB) to define the background colors for various components.

Hex CodeUsage
1st
- Global Widget Background
2nd
- Hover on Menu Items
- Payment Methods Background
- Fiat / Crypto Dropdown Background
- Quote Input (Blend of 1st & 2nd)
3rd
- Selected Crypto's Network Indicator
- Card Background for Instant Off Ramp

2. textColors

Pass a string containing 3 hex color codes (e.g., %23RRGGBB or %23RGB) to define text colors for different sections.

Hex CodeUsage
1st
- Input on Exchange Screen
- Payment Method Selector Radio Background
- Heading Colours
- Selected Crypto's Network Indicator
2nd
- Inactive Tabs
- Dropdown Acronyms
- Secondary Text Colors
3rd
- Profile Page Section Headers
- Dropdown Currency Names
- Background for Leftover User Monthly Limits

3. borderColors

Pass a string containing 3 hex color codes (e.g., %23RRGGBB or %23RGB) to define border colors.

Hex CodeUsage
1stPrimary border for selections
2ndRadio button outer border
3rdMenu Screen Item Borders

Sample Usage

Below are examples of the Transak Widget customized with various themes:

  • Beige themed:
https://global-stg.transak.com/?
apiKey=a2374be4-c59a-400e-809b-72c226c74b8f
&themeColor=%231461DA
&colorMode=LIGHT
&backgroundColors=%23FFF9E6,%23FFF3D9,%23FFE7BF
&textColors=%237D5500,%23A36F00,%23D38A00
&borderColors=%23FFCF7D,%23FFC25D,%23FFB73C
  • Blue themed:
https://global-stg.transak.com/?
apiKey=a2374be4-c59a-400e-809b-72c226c74b8f
&themeColor=%230066FF
&colorMode=LIGHT
&backgroundColors=%23F0F8FF,%23D6EAF8,%23B9DCF5
&textColors=%230D47A1,%231976D2,%2364B5F6
&borderColors=%23B9DCF5,%2390CAF9,%2364B5F6
  • Dark Themed
https://global-stg.transak.com/?
apiKey=a2374be4-c59a-400e-809b-72c226c74b8f
&themeColor=%230052FF
&colorMode=DARK
&backgroundColors=%23141414,%23212121,%23333333
&textColors=%23FFFFFF,%23B0BEC5,%23E0E0E0
&borderColors=%234D4D4D,%235C5C5C,%23666666