# style_add

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

```c
void style_add(struct grid_cell *gc, struct options *oo, const char *name, struct format_tree *ft)
```

## Parameters

- `gc` (`struct grid_cell *`)
- `oo` (`struct options *`)
- `name` (`const char *`)
- `ft` (`struct format_tree *`)

## Called by

- [`style_apply`](/en/tmux/3.2a/reference/c-function-style_apply/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/style.c#L302)
- [`tty_default_colours`](/en/tmux/3.2a/reference/c-function-tty_default_colours/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L2678)

## Calls

- [`format_free`](/en/tmux/3.2a/reference/c-function-format_free/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/style.c#L293)
- [`options_string_to_style`](/en/tmux/3.2a/reference/c-function-options_string_to_style/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/style.c#L283)

## Other function references

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

## Referenced declarations

- [`grid_cell.attr`](/en/tmux/3.2a/reference/c-struct-grid_cell-attr/) (attribute)
- [`grid_cell.bg`](/en/tmux/3.2a/reference/c-struct-grid_cell-bg/) (attribute)
- [`grid_cell.fg`](/en/tmux/3.2a/reference/c-struct-grid_cell-fg/) (attribute)
- [`FORMAT_NOJOBS`](/en/tmux/3.2a/reference/c-define-tmux-h-format_nojobs/) (constant)
- [`format_tree`](/en/tmux/3.2a/reference/c-struct-format_tree/) (struct)
- [`style.gc`](/en/tmux/3.2a/reference/c-struct-style-gc/) (attribute)
- [`grid_cell`](/en/tmux/3.2a/reference/c-struct-grid_cell/) (struct)
- [`options`](/en/tmux/3.2a/reference/c-struct-options/) (struct)
- [`style_default`](/en/tmux/3.2a/reference/c-variable-style-c-style_default/) (attribute)
