Built on Roma
Pencil Box is a flavor of Roma, the interface system behind Tomato Lab’s sites and apps. It shares Roma’s architecture and its components: the same token structure (primitives, then color roles for each theme), the same type, spacing and control scales, and the same buttons, inputs, selection controls, tags and badges, with the same states.
What changes is the flavor, taken from the 2021 Graphic Standards Manual:
| Roma | Pencil Box | |
|---|---|---|
| Palette | Tomato, Dirt, Lab Coat and friends | Department Black, Manila, Beaurocracy Blue, Embargo Red, Safety Yellow, Ledger Green |
| Default theme | Light | Dark |
| Primary action | Tomato | Manila on black (black on Manila in light) |
| Corners | 4px on buttons | 5px on every control, more on media players |
| Rules | Hairlines with 2px emphasis | Hairlines throughout |
| Reading face | Libre Baskerville | Baskerville (Libre Baskerville on the web) |
| Class prefix | tl- | doi- |
When Roma gains a component or fixes one, Pencil Box follows: port the change (pencil-box.css and pencil-box.js are Roma’s files with tl- swapped for doi-), then restyle it with Department tokens. A component that exists only in Pencil Box should be proposed to Roma first. Roma’s Flavors of Roma page has the component map. Two things stay Pencil Box’s own: broadcast interference (doi-broadcast) and the data visualization kit.
Principles
- Black first. Department Black is the dominant color of any page, screen or object, so dark is the default. Manila is its natural complement and the light theme.
- Color with restraint. Beaurocracy Blue is for emphasis, attention or accessibility, in limited form. Embargo Red marks anomalous, otherworldly and strange information: errors, and the guide lines on diagrams. Safety Yellow and Ledger Green signal caution and approval.
- Contrast is paramount. Every text and color pairing meets WCAG AA. Assume the reader has a color vision deficiency: state never relies on color alone.
- No superfluous elements. Hairlines, flat color, corners only softly rounded. The only circles are radio buttons, badges and the seal.
Using Pencil Box on a site
Load the Adobe Fonts kit and Libre Baskerville, the tokens, then the component styles. The site’s domain must be listed in the kit’s settings for the fonts to load. Everything else is plain HTML with doi- classes.
<link rel="stylesheet" href="https://use.typekit.net/hha1ptx.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap">
<link rel="stylesheet" href="https://brand.departmentofinformation.org/tokens/tokens.css">
<link rel="stylesheet" href="https://brand.departmentofinformation.org/assets/pencil-box.css">
<!-- only for media players -->
<script src="https://brand.departmentofinformation.org/assets/pencil-box.js" defer></script>
<button class="doi-button">File a request</button>
Dark is the default: Department Black page, Manila text. To use Manila as the ground, put data-theme="light" on <html> or on any section. This guide’s Theme button does the same, and remembers your choice.
Downloads: tokens.css · tokens.json (W3C design-tokens format, for apps and other platforms) · pencil-box.css · pencil-box.js (media players)
Status
Pencil Box v0.1 is a first draft, built on the 2021 Graphic Standards Manual V.1.0. Still open:
- Baskerville. The manual specifies Baskerville URW in Regular, Medium, Bold and Ultra Bold. The web uses Libre Baskerville (Regular, Bold, Italic) until a licensed web cut is chosen.
- Neue Haas Grotesk Medium. The manual shows a Medium weight; the Adobe Fonts kit has Roman and Bold only.
- Review. The manual predates the components; they follow its rules but have not been through the Office of Public Awareness.
Pencil Box is a working name for this flavor of Roma and may change; class names use the doi- prefix so a rename won't break anything.