kitty_colors: Get the colors used in the kitty terminal

View source: R/kitty_colors.R

kitty_colorsR Documentation

Get the colors used in the kitty terminal

Description

Get the colors used in the kitty terminal

Usage

kitty_colors()

kitty_background()

kitty_foreground()

kitty_palette()

Details

To get the background and foreground colors, kitten query-terminal is called. To get all colors and the palette kitty @get-colors is called using system. However, for the last to work allow_remote_control needs to be set to yes in the config file for kitty.

Value

kitty_colors returns a data.frame with the colors from the theme used by kitty. kitty_background returns the background color (character vector with the hex-code). kitty_foreground returns the foreground color. kitty_palette returns a vector with the 9 main accent colors from the theme.

See Also

term_background, term_foreground, term_palette for functions that try to return the colors used in any terminal. When running in kitty, these will call kitty_background etc.

Examples

if (is_kitty()) {
  cat("The background color is '", kitty_background(), "'.")
}


terminalgraphics documentation built on May 1, 2026, 5:07 p.m.