# tty_check_bg

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

```c
static void tty_check_bg(struct tty *, struct colour_palette *, struct grid_cell *)
```

## Parameters

- `tty` (`struct tty *`)
- `palette` (`struct colour_palette *`)
- `gc` (`struct grid_cell *`)

## Called by

- [`tty_attributes`](/en/tmux/latest/reference/c-function-tty_attributes/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2652)

## Calls

- [`colour_256to16`](/en/tmux/latest/reference/c-function-colour_256to16/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2871)
- [`colour_find_rgb`](/en/tmux/latest/reference/c-function-colour_find_rgb/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2853)
- [`colour_split_rgb`](/en/tmux/latest/reference/c-function-colour_split_rgb/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2852)
- [`tty_term_number`](/en/tmux/latest/reference/c-function-tty_term_number/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2860)

## Other function references

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

## Referenced declarations

- [`grid_cell.bg`](/en/tmux/latest/reference/c-struct-grid_cell-bg/) (attribute)
- [`COLOUR_FLAG_256`](/en/tmux/latest/reference/c-define-tmux-h-colour_flag_256/) (constant)
- [`COLOUR_FLAG_RGB`](/en/tmux/latest/reference/c-define-tmux-h-colour_flag_rgb/) (constant)
- [`colour_palette`](/en/tmux/latest/reference/c-struct-colour_palette/) (struct)
- [`grid_cell.flags`](/en/tmux/latest/reference/c-struct-grid_cell-flags/) (attribute)
- [`tty_term.flags`](/en/tmux/latest/reference/c-struct-tty_term-flags/) (attribute)
- [`grid_cell`](/en/tmux/latest/reference/c-struct-grid_cell/) (struct)
- [`GRID_FLAG_NOPALETTE`](/en/tmux/latest/reference/c-define-tmux-h-grid_flag_nopalette/) (constant)
- [`tty.term`](/en/tmux/latest/reference/c-struct-tty-term/) (attribute)
- [`TERM_256COLOURS`](/en/tmux/latest/reference/c-define-tmux-h-term_256colours/) (constant)
- [`TERM_RGBCOLOURS`](/en/tmux/latest/reference/c-define-tmux-h-term_rgbcolours/) (constant)
- [`tty`](/en/tmux/latest/reference/c-struct-tty/) (struct)
- [`TTYC_COLORS`](/en/tmux/latest/reference/c-enum-tty_code_code-ttyc_colors/) (constant)
