> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/workflows/blocks/blocks/visualize-predictions/rich-label-visualization.md).

# Rich Label Visualization

Draw high-quality, anti-aliased text labels on an image using approved TrueType fonts.

Draw text labels on detected objects using high-quality TrueType font rendering. This block is the rich-text counterpart of the Label Visualization block: instead of OpenCV's built-in bitmap font, it renders labels with Pillow through Supervision's `RichLabelAnnotator`, producing anti-aliased, professional-looking text suitable for production UIs, reports and customer-facing imagery.

## How This Block Works

This block takes an image and detection predictions and draws text labels on each detected object. The block:

1. Takes an image and predictions as input
2. Extracts label text for each detection based on the selected text option (class name, confidence, tracker ID, dimensions, area, time in zone, or index)
3. Resolves the selected `font_family` identifier to an approved font shipped with `inference`
4. Determines label position based on the selected anchor point
5. Applies background color styling based on the selected color palette, with colors assigned by class, index, or track ID
6. Renders anti-aliased text labels with the selected font, size, color, padding and border radius using Supervision's `RichLabelAnnotator`
7. Returns an annotated image with text labels overlaid on the original image

## Approved Fonts

Fonts are selected with the `font_family` parameter. Only fonts approved and distributed with `inference` can be used - arbitrary font files, filesystem paths and remote font URLs are **not** supported. This keeps rendering deterministic and avoids parsing untrusted font files. Official Docker images and wheels ship with all approved fonts included; on bare source checkouts a missing font is fetched on first use from its pinned, checksum-verified source (disable with `ALLOW_WORKFLOWS_FONTS_DOWNLOAD=False`). All approved fonts are licensed under the SIL Open Font License 1.1 and ship with their license texts.

Fonts are selected by display name. 20 fonts are available:

Monospaced: Geist Mono (default, by Vercel), Anonymous Pro, Courier Prime, Fira Code, IBM Plex Mono, Inconsolata, JetBrains Mono, PT Mono, Roboto Mono, Source Code Pro, Space Mono.

Sans serif: Geist, Inter, Lato, Montserrat, Noto Sans, Nunito Sans, Open Sans, Roboto, Work Sans.

Legacy snake\_case identifiers (e.g. `geist_mono`) are still accepted and normalized to the display name.

Noto Sans offers the broadest character coverage (Latin, Greek, Cyrillic). Characters not covered by the selected font render as the font's missing-glyph symbol (typically an empty box) - pick Noto Sans when annotating non-Latin text.

## Comparison with Label Visualization

* **Label Visualization** (`roboflow_core/label_visualization@v1`) uses OpenCV's Hershey fonts - fast, but aliased and pixelated, with no font choice.
* **Rich Label Visualization** (this block) uses TrueType fonts rendered by Pillow - higher-quality anti-aliased output, selectable fonts, Unicode support and optional text wrapping (`max_line_length`), at a small additional rendering cost per frame.

## Common Use Cases

* **Customer-facing visualizations**: Render detection overlays that match your product's typography (e.g. Geist Mono) for websites, dashboards and reports
* **High-quality reporting**: Produce publication-ready annotated images with readable, anti-aliased labels
* **Non-Latin text**: Render labels containing Greek or Cyrillic characters with Noto Sans

### Type identifier

Use the following identifier in step `"type"` field: `roboflow_core/rich_label_visualization@v1` to add the block as a step in your workflow.

### Properties

| **Name**          | **Type**    | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Refs |
| ----------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
| `name`            | `str`       | Enter a unique identifier for this step..                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | ❌    |
| `copy_image`      | `bool`      | Enable this option to create a copy of the input image for visualization, preserving the original. Use this when stacking multiple visualizations..                                                                                                                                                                                                                                                                                                                                                         | ✅    |
| `color_palette`   | `str`       | Select a color palette for the visualised elements..                                                                                                                                                                                                                                                                                                                                                                                                                                                        | ✅    |
| `palette_size`    | `int`       | Specify the number of colors in the palette. This applies when using custom or Matplotlib palettes..                                                                                                                                                                                                                                                                                                                                                                                                        | ✅    |
| `custom_colors`   | `List[str]` | Define a list of custom colors for bounding boxes in HEX format..                                                                                                                                                                                                                                                                                                                                                                                                                                           | ✅    |
| `color_axis`      | `str`       | Choose how bounding box colors are assigned. Detections with a negative class or tracker id (for example unmatched VLM labels with class\_id = -1) are painted in a neutral gray..                                                                                                                                                                                                                                                                                                                          | ✅    |
| `text`            | `str`       | Content to display in text labels. Options: 'Class' (class name), 'Confidence' (confidence score), 'Class and Confidence' (both), 'Tracker Id' (tracking ID for tracked objects), 'Time In Zone' (time spent in zone), 'Dimensions' (center coordinates and width x height), 'Area' (bounding box area in pixels), 'Area (mask)' (mask area in pixels from Mask Area Measurement block), 'Area (converted)' (mask area in converted units from Mask Area Measurement block), or 'Index' (detection index).. | ✅    |
| `text_position`   | `str`       | Anchor position for placing labels relative to each detection's bounding box. Options include: CENTER (center of box), corners (TOP\_LEFT, TOP\_RIGHT, BOTTOM\_LEFT, BOTTOM\_RIGHT), edge midpoints (TOP\_CENTER, CENTER\_LEFT, CENTER\_RIGHT, BOTTOM\_CENTER), or CENTER\_OF\_MASS (center of mass of the object)..                                                                                                                                                                                        | ✅    |
| `text_color`      | `str`       | Color of the label text. Can be a color name (e.g., 'WHITE', 'BLACK') or color code in HEX format (e.g., '#FFFFFF') or RGB format (e.g., 'rgb(255, 255, 255)')..                                                                                                                                                                                                                                                                                                                                            | ✅    |
| `font_family`     | `str`       | Font used to render label text. Pick from approved fonts shipped with `inference`. Arbitrary font files or URLs are not supported. Pick 'Noto Sans' for the broadest character coverage..                                                                                                                                                                                                                                                                                                                   | ✅    |
| `text_size_mode`  | `str`       | How label text size is chosen. 'Manual' uses Size directly. 'Automatic' picks a readable size from image resolution and treats Size as a multiplier around the 1080p baseline (14 pt)..                                                                                                                                                                                                                                                                                                                     | ✅    |
| `font_size`       | `int`       | Font size of the label text, in points. In Manual mode this is the rendered size. In Automatic mode this multiplies the resolution-derived baseline (14 pt at 1080p min dimension)..                                                                                                                                                                                                                                                                                                                        | ✅    |
| `text_padding`    | `int`       | Padding around the text in pixels. Controls the spacing between the text and the label background border..                                                                                                                                                                                                                                                                                                                                                                                                  | ✅    |
| `border_radius`   | `int`       | Border radius of the label background in pixels. Set to 0 for square corners. Higher values create more rounded corners for a softer appearance..                                                                                                                                                                                                                                                                                                                                                           | ✅    |
| `max_line_length` | `int`       | Maximum number of characters per line before the label text wraps. Leave empty to disable wrapping..                                                                                                                                                                                                                                                                                                                                                                                                        | ✅    |

The **Refs** column marks possibility to parametrise the property with dynamic values available in `workflow` runtime. See *Bindings* for more info.

### Input and Output Bindings

The available connections depend on its binding kinds. Check what binding kinds `Rich Label Visualization` in version `v1` has.

<details>

<summary>Input and output bindings</summary>

* input
  * `image` ([*`image`*](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/image.md)): The image to visualize on..
  * `copy_image` ([*`boolean`*](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/boolean.md)): Enable this option to create a copy of the input image for visualization, preserving the original. Use this when stacking multiple visualizations..
  * `predictions` (*Union\[*[*`instance_segmentation_prediction`*](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/instance-segmentation-prediction.md)*,* [*`keypoint_detection_prediction`*](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/keypoint-detection-prediction.md)*,* [*`object_detection_prediction`*](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/object-detection-prediction.md)*,* [*`rle_instance_segmentation_prediction`*](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/rle-instance-segmentation-prediction.md)*]*): Model predictions to visualize..
  * `color_palette` ([*`string`*](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/string.md)): Select a color palette for the visualised elements..
  * `palette_size` ([*`integer`*](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/integer.md)): Specify the number of colors in the palette. This applies when using custom or Matplotlib palettes..
  * `custom_colors` ([*`list_of_values`*](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/list-of-values.md)): Define a list of custom colors for bounding boxes in HEX format..
  * `color_axis` ([*`string`*](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/string.md)): Choose how bounding box colors are assigned. Detections with a negative class or tracker id (for example unmatched VLM labels with class\_id = -1) are painted in a neutral gray..
  * `text` ([*`string`*](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/string.md)): Content to display in text labels. Options: 'Class' (class name), 'Confidence' (confidence score), 'Class and Confidence' (both), 'Tracker Id' (tracking ID for tracked objects), 'Time In Zone' (time spent in zone), 'Dimensions' (center coordinates and width x height), 'Area' (bounding box area in pixels), 'Area (mask)' (mask area in pixels from Mask Area Measurement block), 'Area (converted)' (mask area in converted units from Mask Area Measurement block), or 'Index' (detection index)..
  * `text_position` ([*`string`*](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/string.md)): Anchor position for placing labels relative to each detection's bounding box. Options include: CENTER (center of box), corners (TOP\_LEFT, TOP\_RIGHT, BOTTOM\_LEFT, BOTTOM\_RIGHT), edge midpoints (TOP\_CENTER, CENTER\_LEFT, CENTER\_RIGHT, BOTTOM\_CENTER), or CENTER\_OF\_MASS (center of mass of the object)..
  * `text_color` ([*`string`*](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/string.md)): Color of the label text. Can be a color name (e.g., 'WHITE', 'BLACK') or color code in HEX format (e.g., '#FFFFFF') or RGB format (e.g., 'rgb(255, 255, 255)')..
  * `font_family` ([*`string`*](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/string.md)): Font used to render label text. Pick from approved fonts shipped with `inference`. Arbitrary font files or URLs are not supported. Pick 'Noto Sans' for the broadest character coverage..
  * `text_size_mode` ([*`string`*](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/string.md)): How label text size is chosen. 'Manual' uses Size directly. 'Automatic' picks a readable size from image resolution and treats Size as a multiplier around the 1080p baseline (14 pt)..
  * `font_size` ([*`integer`*](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/integer.md)): Font size of the label text, in points. In Manual mode this is the rendered size. In Automatic mode this multiplies the resolution-derived baseline (14 pt at 1080p min dimension)..
  * `text_padding` ([*`integer`*](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/integer.md)): Padding around the text in pixels. Controls the spacing between the text and the label background border..
  * `border_radius` ([*`integer`*](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/integer.md)): Border radius of the label background in pixels. Set to 0 for square corners. Higher values create more rounded corners for a softer appearance..
  * `max_line_length` ([*`integer`*](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/integer.md)): Maximum number of characters per line before the label text wraps. Leave empty to disable wrapping..
* output
  * `image` ([`image`](https://docs.roboflow.com/workflows/developer-guide/developer-guide/kinds/image.md)): Image in workflows.

</details>

<details>

<summary>Example JSON definition</summary>

```json
{
	    "name": "<your_step_name_here>",
	    "type": "roboflow_core/rich_label_visualization@v1",
	    "image": "$inputs.image",
	    "copy_image": true,
	    "predictions": "$steps.object_detection_model.predictions",
	    "color_palette": "DEFAULT",
	    "palette_size": 10,
	    "custom_colors": [
	        "#FF0000",
	        "#00FF00",
	        "#0000FF"
	    ],
	    "color_axis": "CLASS",
	    "text": "LABEL",
	    "text_position": "CENTER",
	    "text_color": "WHITE",
	    "font_family": "Geist Mono",
	    "text_size_mode": "Manual",
	    "font_size": 14,
	    "text_padding": 10,
	    "border_radius": 0,
	    "max_line_length": 30
	}
```

</details>
