# tty_keys_colours

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty-keys.c#L1682
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-tty_keys_colours/

```c
int tty_keys_colours(struct tty *tty, const char *buf, size_t len, size_t *size, int *fg, int *bg)
```

## Parameters

- `tty` (`struct tty *`)
- `buf` (`const char *`)
- `len` (`size_t`)
- `size` (`size_t *`)
- `fg` (`int *`)
- `bg` (`int *`)

## Called by

- [`cmd_refresh_report`](/en/tmux/latest/reference/c-function-cmd-refresh-client-c-cmd_refresh_report/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-refresh-client.c#L187)
- [`tty_keys_next`](/en/tmux/latest/reference/c-function-tty_keys_next/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty-keys.c#L811)

## Calls

- [`colour_parseX11`](/en/tmux/latest/reference/c-function-colour_parsex11/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty-keys.c#L1735)
- [`log_debug`](/en/tmux/latest/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty-keys.c#L1738)

## Other function references

- [`colour_tostring`](/en/tmux/latest/reference/c-function-colour_tostring/) (function)

## Referenced declarations

- [`tty.client`](/en/tmux/latest/reference/c-struct-tty-client/) (attribute)
- [`tty.flags`](/en/tmux/latest/reference/c-struct-tty-flags/) (attribute)
- [`client.name`](/en/tmux/latest/reference/c-struct-client-name/) (attribute)
- [`tty`](/en/tmux/latest/reference/c-struct-tty/) (struct)
- [`TTY_WAITBG`](/en/tmux/latest/reference/c-define-tmux-h-tty_waitbg/) (constant)
- [`TTY_WAITFG`](/en/tmux/latest/reference/c-define-tmux-h-tty_waitfg/) (constant)
