(Color-Palettes)=
# Color Palettes
`basic-report` gives you a set of pre-defined color palettes while also providing you with the capability to easily
add your own. Once defined within your custom config file you can also use them as default color options for your report
elements. See [](Report-Configuration)
## Pre-defined Colors
The following colors are currently pre-defined and ready to use:
```{image} _static/colors.png
```
```python
r.add_header('forest www.google.com', color='forest')
r.add_header('ocean www.google.com', color='ocean')
r.add_header('cherry www.google.com', color='cherry')
r.add_header('sunset www.google.com', color='sunset')
r.add_header('sunrise www.google.com', color='sunrise')
r.add_header('steel www.google.com', color='steel')
r.add_header('slate www.google.com', color='slate')
r.add_header('ice www.google.com', color='ice')
r.add_header('earth www.google.com', color='earth')
r.add_header('cappuccino www.google.com', color='cappuccino')
r.add_header('parchment www.google.com', color='parchment')
```
## Custom Colors
As mentioned, you can also add additional color palettes to the report using your custom `config.yml` file. Simply
list your own color profiles under the main key `custom_colors`. Then add a new color palette using the following
schema:
```yaml
custom_colors:
slate: # The name to be used for this color palette
border_dark: '#101416' # The border around the header element in dark mode
border_light: '#2c353a' # The border around the header element in light mode
font_and_background: '#708090' # The main color. Either background color for headers, or font color for text
face_color: '#fff0f3' # The font color for the header element
link: '#abc4dc' # The link color
hover: '#374550' # The link color while hovering
```
In order to load your custom color palettes, making them available within your report, simply add a link to your
config file during the report initialization:
```python
r = Report(
report_dir,
report_name,
report_date,
color_mode='dark',
config_file='path/to/your/config/file.yml
)
```
Thereafter you can use any custom, user-defined color palette in your report in most of the elements by simply using
the `color=color_name` keyword.