termbg
« Back to VersTracker
Description:
Rust library for terminal background color detection
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: rust terminal library cli color-detection
Install: brew install termbg
About:
Termbg is a Rust library designed to accurately detect the background color of a user's terminal. It supports both light and dark mode detection across various terminal emulators and operating systems, providing a reliable way for CLI applications to adapt their output.
Key Features:
  • Cross-platform support (Linux, macOS, Windows)
  • Detects both RGB color values and light/dark mode
  • Zero dependencies
  • Supports multiple terminal protocols (XTerm, OSC, etc.)
Use Cases:
  • Automatically switching CLI tool themes based on terminal settings
  • Adapting output contrast for better readability
  • Creating terminal UIs that match user preferences
Alternatives:
  • terminal-colors – Termbg focuses specifically on background detection and offers broader protocol support.
Version History
Detected Version Rev Change Commit
Sep 13, 2025 4:39am 0 VERSION_BUMP 24f7a391
Jan 10, 2025 6:14pm 0 VERSION_BUMP acd879c6