# tty_check_fg

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L2409
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-tty-c-tty_check_fg/

```c
static void tty_check_fg(struct tty *, int *, struct grid_cell *)
```

## Parameters

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

## Called by

- [`tty_attributes`](/en/tmux/3.2a/reference/c-function-tty_attributes/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L2286)

## Calls

- [`colour_256to16`](/en/tmux/3.2a/reference/c-function-colour_256to16/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L2447)
- [`colour_find_rgb`](/en/tmux/3.2a/reference/c-function-colour_find_rgb/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L2434)
- [`colour_split_rgb`](/en/tmux/3.2a/reference/c-function-colour_split_rgb/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L2433)
- [`tty_term_number`](/en/tmux/3.2a/reference/c-function-tty_term_number/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L2441)

## Other function references

- [`tty_get_palette`](/en/tmux/3.2a/reference/c-function-tty-c-tty_get_palette/) (function)

## Referenced declarations

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