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)
Right
// 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
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro