Skip to content
silverpoint
Documentation menu

Concepts

Grounds & substrates

A ground is a whole drawing technique: the prepared substrate, the inks, and how tone is made. A substrate is the colour the ground is prepared on. Neither changes the data geometry.

The two grounds

GroundTone is built bySubstrates
silverpointHatching, drawn by hand (RoughInker). Default.cream, green, blue, ochre
cyanotypeThe weight of an exact white line on Prussian blue (WeightInker); nothing is hatched.prussian
creamcream
cream
xvalue
Mon32
Tue45
Wed41
Thu58
Fri66
Sat38
Sun29
substrate="cream"
greengreen
green
xvalue
Mon32
Tue45
Wed41
Thu58
Fri66
Sat38
Sun29
substrate="green"
blueblue
blue
xvalue
Mon32
Tue45
Wed41
Thu58
Fri66
Sat38
Sun29
substrate="blue"
ochreochre
ochre
xvalue
Mon32
Tue45
Wed41
Thu58
Fri66
Sat38
Sun29
substrate="ochre"
prussianprussian
prussian
xvalue
Mon32
Tue45
Wed41
Thu58
Fri66
Sat38
Sun29
ground="cyanotype"

Setting the ground

On a chart (ground="cyanotype"), on the app-wide provider, or on a Dashboard, which passes it to every chart inside. A prop on a chart always wins.

tsx
import { SilverpointProvider } from '@silverpoint/react';
import { BarChart } from '@silverpoint/react/bar-chart';
import { DonutChart } from '@silverpoint/react/donut-chart';

export function Dashboard() {
  return (
    <SilverpointProvider ground="silverpoint" substrate="green" locale="en-GB">
      <BarChart data={sales} xKey="month" valueKey="units" title="Units sold" unit="units" />
      <DonutChart data={channels} nameKey="channel" valueKey="share" title="Sales by channel" centerLabel="%" />
    </SilverpointProvider>
  );
}

Re-theming with CSS

Every stroke carries a part attribute bound to a public custom property. Overriding a property re-themes the charts without re-rendering them:

css
.sp-ground-silverpoint[data-substrate='cream'] {
  --sp-ink: #4d525a;
  --sp-ink-secondary: #6b5a45;
  --sp-font-display: 'EB Garamond', Georgia, serif;
}

Public properties: --sp-substrate --sp-ink --sp-ink-secondary --sp-heighten --sp-rule --sp-grid --sp-text --sp-text-muted --sp-font-display --sp-stroke-width --sp-hatch-gap --sp-radius --sp-weight-1…4

Mind this
The palette is computed for WCAG contrast, not chosen by eye. If you change an ink, check the contrast again. Every white heightening carries an ink outline so it passes contrast on every substrate.