# tty_check_fg

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

```c
static void tty_check_fg(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/3.7c/reference/c-function-tty_attributes/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2651)

## Calls

- [`colour_256to16`](/en/tmux/3.7c/reference/c-function-colour_256to16/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2807)
- [`colour_find_rgb`](/en/tmux/3.7c/reference/c-function-colour_find_rgb/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2793)
- [`colour_split_rgb`](/en/tmux/3.7c/reference/c-function-colour_split_rgb/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2792)
- [`tty_term_number`](/en/tmux/3.7c/reference/c-function-tty_term_number/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2800)

## Other function references

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

## Referenced declarations

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