> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# URL color overrides

> Override Members Portal theme colors at page load using URL parameters, with support for light and dark mode values.

# URL color overrides

You can override Members Portal colors directly from the page URL. This is useful when you want campaign-specific branding, embedded portal styling, or quick design tests without changing saved styling settings in Nexudus.

## When to use this

Use URL color overrides when you want to:

* apply a temporary color set for a campaign or event
* match the portal colors to a partner or white-label site
* test a new style direction before saving it as the default

<Info>
  Saved colors in Nexudus remain unchanged. URL overrides only affect the session opened with that URL.
</Info>

## How it works

When a page loads with supported `Theme.*` parameters:

1. Nexudus reads the saved colors for the location.
2. URL color values are applied on top of the saved colors.
3. A dynamic stylesheet is generated and loaded with the merged values.

This means the back-end remains the source of saved colors, and URL parameters are applied after those saved colors are returned.

## Supported parameters

### Behaviour parameter

| Parameter                | Values            | What it controls                                                |
| ------------------------ | ----------------- | --------------------------------------------------------------- |
| `Theme.DisableDarkMode`  | `true` or `false` | Forces light mode if set to `true`                              |
| `Theme.DisableLightMode` | `true` or `false` | Forces dark mode if set to `true`                               |
| `Theme.ForceDarkMode`    | `true` or `false` | Forces dark mode for the session when dark mode is not disabled |
| `Theme.ForceLightMode`   | `true` or `false` | Forces light mode for the session                               |

### Light mode color parameters

| Parameter              | Typical use              |
| ---------------------- | ------------------------ |
| `Theme.PrimaryColor`   | Main brand color         |
| `Theme.SecondaryColor` | Secondary brand color    |
| `Theme.TertiaryColor`  | Tertiary accent          |
| `Theme.BrandBlack`     | Dark neutral brand color |
| `Theme.Success`        | Success states           |
| `Theme.Warning`        | Warning states           |
| `Theme.Alert`          | Error and alert states   |
| `Theme.Info`           | Informational states     |
| `Theme.Highlight1`     | Highlight palette 1      |
| `Theme.Highlight2`     | Highlight palette 2      |
| `Theme.Highlight3`     | Highlight palette 3      |
| `Theme.Highlight4`     | Highlight palette 4      |
| `Theme.Highlight5`     | Highlight palette 5      |
| `Theme.Ground`         | Base ground color        |
| `Theme.Surface`        | Surface color            |

### Dark mode color parameters

Use the same colors for dark mode with the `DarkMode` suffix:

* `Theme.PrimaryColorDarkMode`
* `Theme.SecondaryColorDarkMode`
* `Theme.TertiaryColorDarkMode`
* `Theme.BrandBlackDarkMode`
* `Theme.SuccessDarkMode`
* `Theme.WarningDarkMode`
* `Theme.AlertDarkMode`
* `Theme.InfoDarkMode`
* `Theme.Highlight1DarkMode`
* `Theme.Highlight2DarkMode`
* `Theme.Highlight3DarkMode`
* `Theme.Highlight4DarkMode`
* `Theme.Highlight5DarkMode`
* `Theme.GroundDarkMode`
* `Theme.SurfaceDarkMode`

## Example URL

```text theme={null}
https://your-portal.nexudus.com/nexudus?Theme.PrimaryColor=%23D6BF57&Theme.SecondaryColor=%23161616&Theme.TertiaryColor=%2385878A&Theme.BrandBlack=%230B0A12&Theme.PrimaryColorDarkMode=%236092C0
```

<Tip>
  Use `%23` instead of `#` in hex values. Example: `#D6BF57` must be sent as `%23D6BF57`.
</Tip>

## Priority order

If the same visual token exists in multiple places, Nexudus applies values in this order:

1. URL override parameter
2. Saved color in Nexudus styling settings
3. Default portal fallback

## Light and dark mode behaviour

* If portal mode is light, light-mode values are used.
* If portal mode is dark, dark-mode values are used.
* If `Theme.ForceDarkMode=true`, the portal is forced to dark mode for that session.
* If `Theme.ForceLightMode=true`, the portal is forced to light mode for that session.
* If `Theme.DisableDarkMode=true`, the portal is forced to light mode for that session.
* If `Theme.DisableLightMode=true`, the portal is forced to dark mode for that session.

### Mode priority

When multiple mode parameters are present, Nexudus applies this order:

1. `Theme.DisableDarkMode=true` or `Theme.ForceLightMode=true` (light mode)
2. `Theme.DisableLightMode=true` or `Theme.ForceDarkMode=true` (dark mode)
3. Customer saved mode preference

## Mode examples

```text theme={null}
https://your-portal.nexudus.com/nexudus?Theme.ForceDarkMode=true&Theme.PrimaryColorDarkMode=%236092C0
```

```text theme={null}
https://your-portal.nexudus.com/nexudus?Theme.ForceLightMode=true&Theme.PrimaryColor=%23D6BF57
```

## Troubleshooting

If colors are not changing as expected:

1. Confirm parameter names are exact, including capitalization and `Theme.` prefix.
2. Confirm hex values are URL-encoded with `%23`.
3. Confirm you are passing the parameters on the page URL, not only after redirect steps.
4. Confirm dark mode is not disabled when testing dark-mode colors.
5. Hard refresh the page to avoid stale browser CSS.

## Related guides

* [URL Parameters Reference](/member-portal/public/url-parameters)
* [Custom Code and Fonts](/editor/custom-web-injector)
