Skip to main content

Module diff_theme

Module diff_theme 

Source
Expand description

Diff theme configuration and color palettes

Provides terminal-adaptive styling that adjusts background tints based on:

  1. DiffTheme (Dark/Light) — detected from terminal background
  2. DiffColorLevel (TrueColor/Ansi256/Ansi16) — from terminal capability

Colors are selected for WCAG AA accessibility contrast ratios (4.5:1 minimum).

Enums§

DiffColorLevel
Terminal color capability level for palette selection.
DiffTheme
Terminal background theme for diff rendering.

Functions§

diff_add_bg
Get background color for addition lines based on theme and color level.
diff_del_bg
Get background color for deletion lines based on theme and color level.
diff_gutter_bg_add_light
Get gutter background color for addition lines in light theme.
diff_gutter_bg_del_light
Get gutter background color for deletion lines in light theme.
diff_gutter_fg_light
Get gutter foreground color for light theme (dark theme uses dimmed default).