Colors

In Todo.txt TUI, you can customize the colors and text styles for various elements to suit your preferences. The customization options include setting foreground (fg) and background (bg) colors, as well as applying text modifiers to style the text.

Defining Colors

You can specify colors in the following formats:

  • Named Colors: Use standard color names, e.g., "Black", "Red", etc.
  • RGB Values: Use hexadecimal codes, e.g., "#ff0000" for red.
  • Terminal Index: Use terminal color indices, e.g., "9" for bright red.

Applying Text Modifiers

Modifiers allow you to style text with additional visual effects. Available modifiers include:

  • Bold: Makes the text bold.
  • Italic: Applies italic styling.
  • Underlined: Underlines the text.

Example Configuration

To configure custom colors and text modifiers for the project +todo-tui, update your Todo.txt TUI application's TOML configuration file as follows:

[custom_category_style."+todo-tui"]
fg = "#ff0000"      # Set foreground color to red (RGB value)
bg = "Black"        # Set background color to black (named color)
modifiers = "Italic"  # Apply italic styling

This configuration will style the text for +todo-tui with a red foreground, black background, and italicized text.

Options

Flag: -A, --list-active-color
Env: $TODOTXT_TUI_LIST_ACTIVE_COLOR
Conf: list_active_color
Specifies the visual style used to highlight the currently active item in a list. This style helps you quickly identify the selected task.

default:

bg = "LightRed"

Flag: -P, --pending-active-color
Env: $TODOTXT_TUI_PENDING_ACTIVE_COLOR
Conf: pending_active_color
Specifies the text style for highlighting active tasks in the pending list. This overrides `list_active_color`.

Flag: -D, --done-active-color
Env: $TODOTXT_TUI_DONE_ACTIVE_COLOR
Conf: done_active_color
Specifies the text style for highlighting active tasks in the completed list. This overrides `list_active_color`.

Flag: --category-active-color
Env: $TODOTXT_TUI_CATEGORY_ACTIVE_COLOR
Conf: category_active_color
Specifies the text style for highlighting active categories. This overrides `list_active_color`.

Flag: --projects-active-color
Env: $TODOTXT_TUI_PROJECTS_ACTIVE_COLOR
Conf: projects_active_color
Specifies the text style for highlighting active projects. This overrides `category_active_color`.

Flag: --contexts-active-color
Env: $TODOTXT_TUI_CONTEXTS_ACTIVE_COLOR
Conf: contexts_active_color
Specifies the text style for highlighting active contexts. This overrides `category_active_color`.

Flag: --tags-active-color
Env: $TODOTXT_TUI_TAGS_ACTIVE_COLOR
Conf: tags_active_color
Specifies the text style for highlighting active tags. This overrides `category_active_color`.