# Customising admin templates
In your projects with Wagtail, you may wish to replace elements such as the Wagtail logo within the admin interface with your own branding. This can be done through Django's template inheritance mechanism.
You need to create a `templates/wagtailadmin/` folder within one of your apps - this may be an existing one, or a new one created for this purpose, for example, `dashboard`. This app must be registered in `INSTALLED_APPS` before `wagtail.admin`:
```python
INSTALLED_APPS = (
# ...
'dashboard',
'wagtail',
'wagtail.admin',
# ...
)
```
(custom_branding)=
## Custom branding
The template blocks that are available to customise the branding in the admin interface are as follows:
### `branding_logo`
To replace the default logo, create a template file `dashboard/templates/wagtailadmin/base.html` that overrides the block `branding_logo`:
```html+django
{% extends "wagtailadmin/base.html" %}
{% load static %}
{% block branding_logo %}
{% endblock %}
```
The logo also appears in the following pages and can be replaced with its template file:
- **login page** - create a template file `dashboard/templates/wagtailadmin/login.html` that overwrites the `branding_logo` block.
- **404 error page** - create a template file `dashboard/templates/wagtailadmin/404.html` that overrides the `branding_logo` block.
- **wagtail userbar** - create a template file `dashboard/templates/wagtailadmin/userbar/base.html` that overwrites the `branding_logo` block.
### `branding_favicon`
To replace the favicon displayed when viewing admin pages, create a template file `dashboard/templates/wagtailadmin/admin_base.html` that overrides the block `branding_favicon`:
```html+django
{% extends "wagtailadmin/admin_base.html" %}
{% load static %}
{% block branding_favicon %}
{% endblock %}
```
### `branding_title`
To replace the title prefix (which is 'Wagtail' by default), create a template file `dashboard/templates/wagtailadmin/admin_base.html` that overrides the block `branding_title`:
```html+django
{% extends "wagtailadmin/admin_base.html" %}
{% block branding_title %}Frank's CMS{% endblock %}
```
### `branding_login`
To replace the login message, create a template file `dashboard/templates/wagtailadmin/login.html` that overrides the block `branding_login`:
```html+django
{% extends "wagtailadmin/login.html" %}
{% block branding_login %}Sign in to Frank's Site{% endblock %}
```
### `branding_welcome`
To replace the welcome message on the dashboard, create a template file `dashboard/templates/wagtailadmin/home.html` that overrides the block `branding_welcome`:
```html+django
{% extends "wagtailadmin/home.html" %}
{% block branding_welcome %}Welcome to Frank's Site{% endblock %}
```
(custom_user_interface_fonts)=
## Custom user interface fonts
To customise the font families used in the admin user interface, inject a CSS file using the hook [](insert_global_admin_css) and override the variables within the `:root` selector:
```css
:root {
--w-font-sans: Papyrus;
--w-font-mono: Courier;
}
```
(custom_user_interface_colours)=
## Custom user interface colours
```{warning}
The default Wagtail colours conform to the WCAG2.1 AA level colour contrast requirements. When customising the admin colours you should test the contrast using tools like [Axe](https://www.deque.com/axe/browser-extensions/).
```
To customise the colours used in the admin user interface, inject a CSS file using the hook [](insert_global_admin_css) and set the desired variables within the `:root` selector. There are two ways to customisation options: either set each colour separately (for example `--w-color-primary: #2E1F5E;`); or separately set [HSL](https://en.wikipedia.org/wiki/HSL_and_HSV) (`--w-color-primary-hue`, `--w-color-primary-saturation`, `--w-color-primary-lightness`) variables so all shades are customised at once. For example, setting `--w-color-secondary-hue: 180;` will customise all of the secondary shades at once.
Make sure to test any customisations against our Contrast Grid. Try out your own customisations with this interactive style editor:Variable Usage --w-color-black
Shadows only --w-color-grey-600
Body copy, user content --w-color-grey-400
Help text, placeholders, meta text, neutral state indicators --w-color-grey-200
Dividers, button borders --w-color-grey-150
Field borders --w-color-grey-100
Dividers, panel borders --w-color-grey-50
Background for panels, row highlights --w-color-white
Page backgrounds, Panels, Button text --w-color-primary
Wagtail branding, Panels, Headings, Buttons, Labels --w-color-primary-200
Accent for elements used in conjunction with primary colour in sidebar --w-color-secondary
Primary buttons, action links --w-color-secondary-600
Hover states for two-tone buttons --w-color-secondary-400
Two-tone buttons, hover states --w-color-secondary-100
UI element highlights over dark backgrounds --w-color-secondary-75
UI element highlights over dark text --w-color-secondary-50
Button backgrounds, highlighted fields background --w-color-info-100
Background and icons for information messages --w-color-info-50
Background only, for information messages --w-color-positive-100
Positive states --w-color-positive-50
Background only, for positive states --w-color-warning-100
Background and icons for potentially dangerous states --w-color-warning-50
Background only, for potentially dangerous states --w-color-critical-200
Dangerous actions or states (over light background), errors --w-color-critical-100
Dangerous actions or states (over dark background) --w-color-critical-50
Background only, for dangerous states