on this page
- Picking a scheme
- Colour values
- The base scheme
- name
- Colour slots
- background
- foreground
- dim
- border
- border_focused
- accent
- selection_bg
- selection_fg
- unread
- highlight
- highlight_bg
- timestamp
- self_nick
- notice
- action
- event
- error
- success
- topic
- link
- status_bg
- status_fg
- nick_palette
- Every scheme
- How a scheme fills the slots
- Examples
theme.lua
Colours. This is the theme table in the config.
A theme is a bundled scheme with anything you set here laid over the top.
The starter theme.lua sets nothing at all, and that is deliberate: an empty
table lets every colour follow the scheme, which is what lets the picker
change how luir looks. Uncomment only the colours you want to differ.
Picking a scheme
alt+t opens the picker. Type to filter, move up and down, and the whole
client is redrawn in whichever scheme is highlighted, so you judge it on your
own channels rather than on a swatch. enter keeps it and esc puts back what
you had. /theme gruvbox sets one without opening the picker.
Where a colour comes from, highest first:
- a colour slot set in
theme.lua - the scheme chosen in the picker, saved in
state.json nameintheme.lua- luir's own palette
So the picker wins over name, and says so when luir starts and the two
disagree. /theme reset forgets the picker's choice and hands it back to
theme.lua.
If your theme.lua comes from before the schemes existed, it spells out every
colour, and those win over any scheme, so the picker appears to do nothing. The
picker's footer says as much and counts them. Comment them out, or keep only
the ones you actually chose.
Colour values
Every colour slot accepts any of these:
| Written as | Means |
|---|---|
"#7aa2f7" |
A 24-bit colour |
"#7af" |
Short form, the same as "#77aaff" |
"208" |
An entry from 0 to 255 in the terminal's palette |
"brightblue" |
A named ANSI colour, taken from your terminal's own theme |
"default" |
The terminal's own foreground or background |
"default" can also be written "reset" or "none". For background it is
the one worth knowing: it lets the terminal's own background show through, so a
transparent terminal stays transparent.
The ANSI names are black, red, green, yellow, blue, magenta (or
purple), cyan, gray (or grey), darkgray (or darkgrey), and the
bright ones: brightred, brightgreen, brightyellow, brightblue,
brightmagenta, brightcyan and brightwhite. light works in place of
bright, and hyphens, underscores and spaces are ignored, so bright-red and
light_red both work.
Careful with white: "white" is the ANSI light grey, the same as "gray".
"brightwhite" is the actual white.
The base scheme
- name
The scheme everything else starts from, from the list below. Leave it out for luir's own palette.
Names are matched without regard to case, and
-and_count as the same, sogruvbox-light,gruvbox_lightandGruvbox_Lightare one scheme. Three older names still work:draculafindschadracula,monokaifindsmonekai, andsolarizedfindssolarized_dark.A name that matches nothing falls back to luir's own palette, and luir says which name it did not recognise.
Colour slots
Each of these is optional. Set one and it wins over the scheme, including a scheme chosen in the picker. The defaults shown are luir's own palette; any other scheme fills them from its own colours.
- background
Behind everything. luir's own palette uses the terminal's background; every bundled scheme names one of its own, since that is much of what makes it look like itself.
- foreground
Ordinary text.
- dim
Secondary text: hints, labels, and anything that should step back.
- border
The rules and boxes between panels.
- border_focused
The border of the panel that has focus.
- accent
Things that should stand out: the focused panel's title, and the name of the buffer you are in.
- selection_bg
Behind the highlighted row, in the sidebar, the member list and the pickers.
- selection_fg
Text on the highlighted row.
- unread
Buffers with unread messages, and the unread and activity counts in the status bar.
- highlight
Messages and buffers that mention you, and the highlight counts.
- highlight_bg
Behind a message that mentions you.
- timestamp
Message timestamps.
- self_nick
Your own nick.
- notice
Notices.
- action
/melines.- event
Joins, parts, quits and the other server events.
- error
Errors, and the status bar while the connection is retrying.
- success
Confirmations, and the calm end of the lag and send-rate charts.
- topic
The channel topic.
- link
Links in messages.
- status_bg
Behind the status bar, unless status.lua sets its own.
- status_fg
Status bar text, unless status.lua sets its own.
- nick_palette
The colours nicks are drawn in when
ui.nick_colorsis on. Each nick lands on one of them the same way every time, so a person keeps their colour.luir's own palette has twelve:
nick_palette = { "#7aa2f7", "#9ece6a", "#e0af68", "#bb9af7", "#7dcfff", "#f7768e", "#73daca", "#ff9e64", "#b4f9f8", "#c0caf5", "#e6a3d0", "#8bd5a0", },A bundled scheme uses eight of its accent colours.
Every scheme
Ninety-eight of them: luir's own, then the whole of NvChad's base46 set, under the names NvChad gives them. Any that are meant for a light terminal say so.
luiraquariumashesaylinayu_darkayu_lightlightbearded-arcblossom_lightlightcarbonfoxcatppuccin-lattelightcatppuccinchadracula-evondevchadraculachadtainchocolatedarcula-darkdark_horizondecaydefault-darkdefault-lightlightdoomchadeldritchembarkespresso-lightlightespressoeverblusheverforesteverforest_lightlightfalconflex-lightlightflexoki-lightlightflexokiflouromachinegatekeepergithub_darkgithub_lightlightgruvboxgruvbox_lightlightgruvchadhiberbeehorizonjabutijellybeanskanagawa-dragonkanagawamaterial-darkermaterial-deep-oceanmaterial-lighterlightmelangemidnight_breezemito-lasermonekaimonochromemountainnano-lightlightneofusionnightfoxnightlampnightowlnordobsidian-emberoceanic-lightlightoceanic-nextone_lightlightonedarkonenordonenord_lightlightoxocarbonpalenightpastelbeanspastelDarkpenumbra_darkpenumbra_lightlightpoimandresradiumrosepine-dawnlightrosepinerxyhnscaryforestseoul256_darkseoul256_lightlightslatewavesolarized_darksolarized_lightlightsolarized_osakastarlightsunrise_breezelightsweetpasteltokyodarktokyonighttomorrow_nighttundravespervscode_darkvscode_lightlightwombatyoruzenburn
How a scheme fills the slots
Each bundled scheme is a base16 palette of sixteen colours, taken verbatim from
NvChad's base_16 tables, and every scheme fills luir's slots from them in the
same way. That keeps them consistent with one another, and makes porting any
other base16 scheme a matter of sixteen colours.
In base16, base00 to base07 run from background to foreground, and base08
to base0F are the accents: red, orange, yellow, green, cyan, blue, magenta
and brown.
| Slot | From |
|---|---|
background |
base00 |
border, status_bg |
base01 |
selection_bg, highlight_bg |
base02 |
dim, border_focused, timestamp, event |
base03 |
topic, status_fg |
base04 |
foreground |
base05 |
selection_fg |
base06 |
highlight, error |
base08 |
unread |
base0A |
action, success |
base0B |
self_nick, link |
base0C |
accent |
base0D |
notice |
base0E |
nick_palette |
base0D, base0B, base0A, base0E, base0C, base08, base09, base0F |
This is a mapping of palettes rather than a match for how a scheme looks in an editor. luir has a sidebar and a member list where an editor has syntax, so the colours are spent on different things.
Examples
Start from a scheme and change only what you disagree with:
return {
name = "gruvbox",
accent = "#7aa2f7",
}
Name a colour once and use it in several places:
local mine = { accent = "#7aa2f7", red = "#f7768e" }
return {
name = "gruvbox",
accent = mine.accent,
highlight = mine.red,
error = mine.red,
}
Keep a transparent terminal transparent:
return {
name = "catppuccin",
background = "default",
}
A classic terminal palette to go with style = "classic" in ui.lua. It names
no scheme and uses only ANSI colours, so it follows whatever your terminal is
themed with, the way the old clients did:
return {
background = "default", foreground = "gray",
dim = "darkgray", border = "darkgray",
border_focused = "gray", accent = "brightcyan",
selection_bg = "blue", selection_fg = "brightwhite",
unread = "brightyellow", highlight = "brightred",
highlight_bg = "default", timestamp = "darkgray",
self_nick = "brightwhite", notice = "brightmagenta",
action = "brightgreen", event = "darkgray",
error = "brightred", success = "brightgreen",
topic = "brightcyan", link = "brightblue",
status_bg = "blue", status_fg = "brightwhite",
}
