Skip to content

ESP32 Log Colors Not Rendering in Terminal

DodaTech Updated 2026-06-26 1 min read

In this tutorial, you'll learn about ESP32 Log Colors Not Rendering in Terminal. We cover key concepts, practical examples, and best practices.

The Problem

ESP32 colored log output shows escape codes instead of colors in the terminal.

Quick Fix

Wrong

ESP_LOGI(TAG, "message");  // Default colors may not show
[0;32mI (123) tag: message[0m
(Escape codes visible instead of colors)
// Enable color in menuconfig:
// CONFIG_LOG_COLORS=y (default enabled)
// Use appropriate terminal (minicom, screen, idf.py monitor)
ESP_LOGE(TAG, "Red error");
ESP_LOGW(TAG, "Yellow warning");
ESP_LOGI(TAG, "Green info");
ESP_LOGD(TAG, "Cyan debug");
(Red) I (123) tag: Red error
(Yellow) W (124) tag: Yellow warning
(Green) I (125) tag: Green info
(Cyan) D (126) tag: Cyan debug

Prevention

Use idf.py monitor which supports ANSI colors. Set TERM=xterm-256color in your terminal. Enable CONFIG_LOG_COLORS in menuconfig. Disable colors for serial logging to files. Use esp_log_set_putchar() for custom output.

DodaTech engineers apply these same patterns across Doda Browser, DodaZIP, and Durga Antivirus Pro for production IoT reliability.

FAQ

### What terminal supports ESP32 log colors?

idf.py monitor, screen, minicom, PuTTY with colour support. Windows cmd does not show colors. Use VS Code serial monitor for color support.

Can I customize log colors?

Yes. Define LOG_COLOR_DEBUG, LOG_COLOR_INFO, etc. in your build configuration. Each level has a configurable ANSI color code.

How do I disable colors?

Set CONFIG_LOG_COLORS=n in menuconfig or pass --monitor-no-color to idf.py monitor.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro