# tty_attributes

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

```c
void tty_attributes(struct tty *tty, const struct grid_cell *gc, const struct grid_cell *defaults, struct colour_palette *palette, struct hyperlinks *hl)
```

## Parameters

- `tty` (`struct tty *`)
- `gc` (`const struct grid_cell *`)
- `defaults` (`const struct grid_cell *`)
- `palette` (`struct colour_palette *`)
- `hl` (`struct hyperlinks *`)

## Called by

- [`cmd_display_panes_draw_pane`](/en/tmux/3.7c/reference/c-function-cmd-display-panes-c-cmd_display_panes_draw_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-display-panes.c#L169)
- [`tty_cell`](/en/tmux/3.7c/reference/c-function-tty_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2267)
- [`tty_cmd_alignmenttest`](/en/tmux/3.7c/reference/c-function-tty_cmd_alignmenttest/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2030)
- [`tty_cmd_cells`](/en/tmux/3.7c/reference/c-function-tty_cmd_cells/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2116)
- [`tty_default_attributes`](/en/tmux/3.7c/reference/c-function-tty_default_attributes/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L3105)
- [`tty_draw_line`](/en/tmux/3.7c/reference/c-function-tty_draw_line/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty-draw.c#L176)

## Calls

- [`tty_check_bg`](/en/tmux/3.7c/reference/c-function-tty-c-tty_check_bg/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2652)
- [`tty_check_fg`](/en/tmux/3.7c/reference/c-function-tty-c-tty_check_fg/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2651)
- [`tty_check_us`](/en/tmux/3.7c/reference/c-function-tty-c-tty_check_us/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2653)
- [`tty_colours`](/en/tmux/3.7c/reference/c-function-tty-c-tty_colours/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2666)
- [`tty_hyperlink`](/en/tmux/3.7c/reference/c-function-tty-c-tty_hyperlink/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2709)
- [`tty_putcode`](/en/tmux/3.7c/reference/c-function-tty_putcode/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2674)
- [`tty_putcode_i`](/en/tmux/3.7c/reference/c-function-tty_putcode_i/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2683)
- [`tty_reset`](/en/tmux/3.7c/reference/c-function-tty_reset/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2660)
- [`tty_set_italics`](/en/tmux/3.7c/reference/c-function-tty-c-tty_set_italics/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2678)
- [`tty_term_has`](/en/tmux/3.7c/reference/c-function-tty_term_has/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2640)

## Other function references

- [`tty_acs_needed`](/en/tmux/3.7c/reference/c-function-tty_acs_needed/) (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)
- [`tty.cell`](/en/tmux/3.7c/reference/c-struct-tty-cell/) (attribute)
- [`COLOUR_DEFAULT`](/en/tmux/3.7c/reference/c-define-tmux-h-colour_default/) (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)
- [`GRID_ATTR_ALL_UNDERSCORE`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_attr_all_underscore/) (constant)
- [`GRID_ATTR_BLINK`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_attr_blink/) (constant)
- [`GRID_ATTR_BRIGHT`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_attr_bright/) (constant)
- [`GRID_ATTR_CHARSET`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_attr_charset/) (constant)
- [`GRID_ATTR_DIM`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_attr_dim/) (constant)
- [`GRID_ATTR_HIDDEN`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_attr_hidden/) (constant)
- [`GRID_ATTR_ITALICS`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_attr_italics/) (constant)
- [`GRID_ATTR_OVERLINE`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_attr_overline/) (constant)
- [`GRID_ATTR_REVERSE`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_attr_reverse/) (constant)
- [`GRID_ATTR_STRIKETHROUGH`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_attr_strikethrough/) (constant)
- [`GRID_ATTR_UNDERSCORE`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_attr_underscore/) (constant)
- [`GRID_ATTR_UNDERSCORE_2`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_attr_underscore_2/) (constant)
- [`GRID_ATTR_UNDERSCORE_3`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_attr_underscore_3/) (constant)
- [`GRID_ATTR_UNDERSCORE_4`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_attr_underscore_4/) (constant)
- [`GRID_ATTR_UNDERSCORE_5`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_attr_underscore_5/) (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)
- [`hyperlinks`](/en/tmux/3.7c/reference/c-struct-hyperlinks/) (struct)
- [`tty.last_cell`](/en/tmux/3.7c/reference/c-struct-tty-last_cell/) (attribute)
- [`grid_cell.link`](/en/tmux/3.7c/reference/c-struct-grid_cell-link/) (attribute)
- [`tty.term`](/en/tmux/3.7c/reference/c-struct-tty-term/) (attribute)
- [`tty`](/en/tmux/3.7c/reference/c-struct-tty/) (struct)
- [`TTYC_BLINK`](/en/tmux/3.7c/reference/c-enum-tty_code_code-ttyc_blink/) (constant)
- [`TTYC_BOLD`](/en/tmux/3.7c/reference/c-enum-tty_code_code-ttyc_bold/) (constant)
- [`TTYC_DIM`](/en/tmux/3.7c/reference/c-enum-tty_code_code-ttyc_dim/) (constant)
- [`TTYC_INVIS`](/en/tmux/3.7c/reference/c-enum-tty_code_code-ttyc_invis/) (constant)
- [`TTYC_REV`](/en/tmux/3.7c/reference/c-enum-tty_code_code-ttyc_rev/) (constant)
- [`TTYC_SETAB`](/en/tmux/3.7c/reference/c-enum-tty_code_code-ttyc_setab/) (constant)
- [`TTYC_SMACS`](/en/tmux/3.7c/reference/c-enum-tty_code_code-ttyc_smacs/) (constant)
- [`TTYC_SMOL`](/en/tmux/3.7c/reference/c-enum-tty_code_code-ttyc_smol/) (constant)
- [`TTYC_SMSO`](/en/tmux/3.7c/reference/c-enum-tty_code_code-ttyc_smso/) (constant)
- [`TTYC_SMUL`](/en/tmux/3.7c/reference/c-enum-tty_code_code-ttyc_smul/) (constant)
- [`TTYC_SMULX`](/en/tmux/3.7c/reference/c-enum-tty_code_code-ttyc_smulx/) (constant)
- [`TTYC_SMXX`](/en/tmux/3.7c/reference/c-enum-tty_code_code-ttyc_smxx/) (constant)
- [`grid_cell.us`](/en/tmux/3.7c/reference/c-struct-grid_cell-us/) (attribute)
