From a3d5f9f740e2d61b83484856d22ee5ff39fed3d3 Mon Sep 17 00:00:00 2001 From: Michelle Tilley Date: Fri, 16 Jan 2026 11:14:48 -0800 Subject: Theming: explain how to set ANSI codes directly (#3065) **Migrated from atuinsh/docs PR:** https://github.com/atuinsh/docs/pull/109 **Original author:** @philtweir --- ### What is the purpose of this pull request? Short change to note that there is a supported way of directly setting ANSI codes, and other Crossterm colours, directly using the `@` symbol. ### Why is this relevant? This could provide a workaround for issues such as https://github.com/atuinsh/atuin/issues/2827, where a 256 colour terminal shows all themes as grey. Co-authored-by: Phil Weir Co-authored-by: Claude Opus 4.5 --- docs/docs/guide/theming.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs') diff --git a/docs/docs/guide/theming.md b/docs/docs/guide/theming.md index e6c36bdd..2d71d41d 100644 --- a/docs/docs/guide/theming.md +++ b/docs/docs/guide/theming.md @@ -95,6 +95,17 @@ For example, the following are valid color names: * `@ansi_(255)` * `@rgb_(255, 128, 0)` +You can also express colors through Crossterm-supported strings, prefixed by `@`. +For example, + +* `@ansi_(123)` +* `@dark_yellow` + +While there is not currently an official reference, you can see examples in the +[crossterm tests](https://docs.rs/crossterm/latest/src/crossterm/style/types/color.rs.html#376). +As this is passed straight to Crossterm, using [ANSI codes](https://www.ditig.com/256-colors-cheat-sheet) +can be helpful for ensuring your theme is compatible with 256-color terminals. + A theme file, say `my-theme.toml` can then be built up, such as: ```toml -- cgit v1.3.1