Rendering Modes

A rendering mode is the class that tells a screen what its panel can print. Three grayscale tiers cover the panels with no color, one class per palette covers the color panels, and the mode class publishes its own paint depth for the JavaScript runtime to read.

#

The three grayscale tiers

A grayscale screen carries one tier class. The class names how many grays the panel prints, and it picks both the paint rail and a set of display variables.

  • screen--1bit: every gray token paints as a dither pattern of black and white pixels, borders and text fills included. The root display variables apply unchanged.
  • screen--2bit: tokens still dither, between four gray tones instead of two. Table and progress metrics scale with the interface.
  • screen--4bit: every gray token paints as a solid, and each border step gets its own shade instead of two steps sharing one. The title bar drops its pixel-font padding offset and its text stroke thins.

All three tiers resolve a chromatic token to its gray fallback, so a theme hue never reaches a panel that cannot print it.

The demo below labels the tier it is rendering on. Switch device in the Device Preview to see the same screen on each one.

Cold chain
Bay 1 82%
Bay 2 64%
Bay 3 38%
TRMNL Logo Rendering Modes Grayscale tiers
<!-- Two grays: the fills dither -->
<div class="screen screen--ogv2 screen--2bit">...</div>

<!-- Sixteen grays: the fills paint as solids -->
<div class="screen screen--v2 screen--4bit">...</div>
#

The color modes

A color panel carries a palette class in place of a tier class. Two families cover them.

  • One class per limited ink set (screen--color-3bwr, screen--color-3bwy, screen--color-4bwry, screen--color-6a, screen--color-7a): every framework token, grayscale rail included, dithers down to that palette's fixed inks.
  • screen--color-full for 12-bit and 24-bit displays: every token paints at its actual hex, with no ink remap and no dithering.

Paint is palette-driven. The palette selected for a device decides which class the screen wears, and the class decides the rail. Color Palettes lists every palette and the class it maps to.

<!-- Seven inks: bg--red-60 dithers between the panel's inks -->
<div class="screen screen--inkplate_6_color screen--color-7a">...</div>

<!-- Full color: bg--red-60 paints that exact hex -->
<div class="screen screen--generic_16_9 screen--color-full">...</div>
#

How the runtime learns the depth

The rule that selects a screen's paint rail also publishes that rail's depth as --framework-bit-depth. The JavaScript runtime reads the resolved value and never parses a class name, so a palette added in CSS reaches it with no JavaScript change.

Mode class Published depth
No mode class 1
screen--1bit 1
screen--2bit 2
screen--4bit 4
Any limited palette class 4
screen--color-full 12

The depth describes the rail, not the panel's storage. A limited palette prints solid inks the way the 4-bit rail prints solid tokens, so it publishes 4. A screen with no mode class publishes 1, because an unstated device is treated as the most constrained one.

Every mode rule carries the same specificity, so a screen wearing two mode classes reports the rail that actually painted. screen--2bit screen--color-7a paints palette inks and publishes 4.

Runtime engines gate on the published value: pixel-perfect fonts stand down at 4 and up, and the even index-width pin stops at 2 and up. See Framework Runtime , or Paint API to read the variable from your own JavaScript.

#

Where the numeric variants stop

Utility classes take three numeric variant prefixes: 1bit:, 2bit:, and 4bit:. They end at 4-bit because grayscale glass ends at 16 levels, so those three cover every grayscale panel.

Color is a separate axis, and no numeric variant matches a color screen. Target the color modes from SCSS instead, with the for-color-palette($id) and for-color-full mixins on Sass Mixins .

<!-- A dense dither needs a lighter shade to stay readable -->
<div class="layout bg--gray-65 2bit:bg--gray-75 4bit:bg--gray-70">...</div>

Do not build on screen--8bit or screen--16bit. Both are compatibility aliases scheduled for removal. They take the 4-bit display variables and the 4-bit paint rail, though they publish their own number as the depth rather than 4.

Nothing above 4-bit grayscale needs them. The axis above 16 grays is color, through screen--color-full.

Responsive covers the full variant grammar, including how bit-depth prefixes combine with breakpoints and orientation.

#

Chart series per mode

Chart series colors follow the mode too. Grayscale tiers and limited palettes draw from the shade ladder, which opens on the screen's ink and steps toward its canvas.

screen--color-full draws from a categorical color ramp instead: the ink, then seven hues in a fixed order, with steps picked for the light and dark ground separately. A theme's own ramp still wins over both.

Painting Charts resolves the active ramp from JavaScript, and Chart covers the markup.