---
title: "Design Principles for tracetheme"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Design Principles for tracetheme}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
```

This vignette outlines the design decisions that have been taken during the development of the tracetheme R package, and provides some of the reasoning, and possible pros and cons of each decision.

This document is primarily intended to be read by those interested in understanding the code within the package and for potential package contributors.

## Scope

The package provides one theme function, named `trace_theme()`, to match the name of the existing theme functions provided out of the box by ggplot2.

## Input/Output/Interoperability

This package should work with plots provided by:

- ggplot2
- ggraph

## Design decisions

### Alignment with Epiverse-TRACE web theme

Epiverse-TRACE already has a clear visual identity for its web resources, via the [pkgdown custom theme](https://epiverse-trace.github.io/epiversetheme/), the [varnish fork to customize the look of online training materials](https://github.com/epiverse-trace/varnish), and the [custom theme for the quarto website](https://github.com/epiverse-trace/epiverse-trace.github.io/blob/0d70e09531c422648e0a1d46f7ca64c45def78a2/custom.scss).

The custom ggplot2 theme and scale provided here should roughly align with this existing visual identity.

In practice, this means:

- The default font should be [`DM Sans`](https://fonts.google.com/specimen/DM+Sans), or [`Roboto Mono`](https://fonts.google.com/specimen/Roboto+Mono) for code.
- The colour scale should use one or more of the Epiverse-TRACE brand colours:
  - [Indigo](https://color-hex.org/color/071e2d)
  - [Deep Coral](https://color-hex.org/color/f04a4c)
  - [Ether Blue](https://color-hex.org/color/106ba0)
  - [Aqua](https://color-hex.org/color/10bed2)
  - [Olive](https://color-hex.org/color/aec800)
  - [Lime](https://color-hex.org/color/deff00)
  - [Cool Gray](https://color-hex.org/color/888888)
  - [Warm Gray](https://color-hex.org/color/ebe6e0)

### Accessibility requirements

The package should aim to be accessible to all users, including those with visual impairments. As such:

- The default font size and weight, and the default line thickness, should be have reasonably high values
- The default colour scale should be accessible for colourblind users, and for non-colour printing.

## Dependencies

The only hard dependency of this package should be ggplot2.

We anticipate using other dependencies during the development of this package, such as the colorspace package. But these development packages don't need to be added to the `DESCRIPTION` file.
