* Gets the currently active theme. * @returns The active theme.
()
| 126 | * @returns The active theme. |
| 127 | */ |
| 128 | getActiveTheme(): Theme { |
| 129 | if (process.env['NO_COLOR']) { |
| 130 | return NoColorTheme; |
| 131 | } |
| 132 | // Ensure the active theme is always valid (fall back to default if not) |
| 133 | if (!this.activeTheme || !this.findThemeByName(this.activeTheme.name)) { |
| 134 | this.activeTheme = DEFAULT_THEME; |
| 135 | } |
| 136 | return this.activeTheme; |
| 137 | } |
| 138 | |
| 139 | /** |
| 140 | * Gets the semantic colors for the active theme. |
no test coverage detected