---
title: 'Theme Proof: Interaction + Ochre'
name: proof-ochre-structural
description: A full page in the cool Interaction direction with the ochre family.
output:
  rmarkdown::html_vignette:
    toc: yes
    toc_depth: 2
    css: albers.css
    includes:
      in_header: albers-header.html
params:
  family: ochre
  preset: interaction
  base_size: 13
  content_width: 78
  style: minimal
resource_files:
- albers.css
- albers.js
- albers-header.html

vignette: |
  %\VignetteIndexEntry{Theme Proof: Interaction + Ochre}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(
  collapse = TRUE, comment = "#>", fig.align = "center", fig.retina = 2,
  out.width = "100%", fig.width = 7, fig.asp = 0.6, message = FALSE, warning = FALSE
)
set.seed(123)
library(ggplot2)
if (requireNamespace("ragg", quietly = TRUE)) knitr::opts_chunk$set(dev = "ragg_png")
if (
  requireNamespace("systemfonts", quietly = TRUE) &&
  requireNamespace("albersdown", quietly = TRUE) &&
  "albers_register_fonts" %in% getNamespaceExports("albersdown")
) {
  albersdown::albers_register_fonts()
}
if (requireNamespace("ggplot2", quietly = TRUE) && requireNamespace("albersdown", quietly = TRUE)) {
  ggplot2::theme_set(albersdown::theme_albers(family = params$family, preset = params$preset))
}
```

```{r albers-classes, echo=FALSE, results='asis'}
cat(sprintf(
  paste0(
    '<script>document.addEventListener("DOMContentLoaded",function(){',
    'document.body.classList.remove("palette-red","palette-lapis","palette-ochre","palette-teal","palette-green","palette-violet","preset-homage","preset-interaction","preset-study","preset-structural","preset-adobe","preset-midnight");',
    'document.body.classList.add("palette-%s","preset-%s");',
    '});</script>'
  ),
  params$family,
  params$preset
))
```

## What this page proves

This is a full page in the **Interaction** direction (cool grey ground, grotesk
type, dark code blocks) with the **ochre** family. The same dark code panel and
cool ground as `vignette("interaction")`, but the accents — links, the
nested-square marker, the syntax-accent rule, and the plot palette — are ochre
rather than lapis. Direction sets the mood; family sets the hue.

> TIP: On the dark code ground, the syntax token colours adapt automatically so
> code stays legible regardless of the family.

## Code on a dark ground

```{r}
albersdown::albers_palette("ochre")
```

Inline code such as `theme_albers(preset = "interaction")` stays a light chip so
it reads inside the body text.

## A table

```{r}
knitr::kable(
  head(mtcars[, c("mpg", "wt", "hp", "cyl")]),
  caption = "Ochre accents on the table header rule, cool ground."
)
```

## A plot on the matching ground

```{r}
ggplot(mtcars, aes(wt, mpg, colour = factor(cyl))) +
  geom_point(size = 2.3) +
  albersdown::scale_color_albers(family = params$family) +
  labs(
    title = "Fuel efficiency vs. weight",
    subtitle = "Interaction ground with ochre accents",
    x = "Weight (1000 lbs)", y = "MPG", colour = "Cylinders"
  )
```
