# @dioramajs/text/ribbon

Exports of @dioramajs/text/ribbon.

## Functions and values

- [alphaOf](/docs/api/text-ribbon/alpha-of.md): The alpha of a computed CSS color, 1 when it has none: `rgb(0 0 0 / 0.5)`, `rgba(0, 0, 0, 0.5)`.
- [backOf](/docs/api/text-ribbon/back-of.md): The back of the cloth: the surface (or the text) color darker, or lighter when it is dark.
- [cloth](/docs/api/text-ribbon/cloth.md): A grid over each strip, `step` px apart (coarser past MAX_VERTICES): positions in box px, the strip's start x, length, centre y and half height, and its index for the phases.
- [default](/docs/api/text-ribbon/default.md): The heading printed on a waving 3D cloth: a flag pinned at its left edge, a ribbon that twists along its length and shows its tinted back, or silk with slow ripples and a sweeping sheen. The folds are lit by their normals and the cloth casts a soft shadow on the page. The DOM text stays for screen readers, search and selection, and shows again whenever the cloth rests flat.
- [strips](/docs/api/text-ribbon/strips.md): The cloth of a style. A tinted flag or silk is the element's box; a tinted ribbon spans the box and splits its height between the lines. Without a tint the cloth is the ink with `pad` px around it: the whole text for a flag or silk, each line on its own for a ribbon.
- [waves](/docs/api/text-ribbon/waves.md): Amplitude (px) and wave number (rad/px) for cloth `length` px long: `folds` waves along it, as steep as the style allows at `wind` 1.

## Types

- [Strip](/docs/api/text-ribbon/types/strip.md): A band of cloth in box px (y down): one for a flag or silk, one per line for a ribbon.
- [Style](/docs/api/text-ribbon/types/style.md)
