kitty_colors | R Documentation |
Get the colors used in the kitty terminal
kitty_colors()
kitty_background()
kitty_foreground()
kitty_palette()
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 true
in the config
file for kitty.
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.
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.
if (is_kitty()) {
cat("The background color is '", kitty_background(), "'.")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.