# style_tostring

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

```c
const char * style_tostring(struct style *sy)
```

## Parameters

- `sy` (`struct style *`)

## Calls

- [`xsnprintf`](/en/tmux/latest/reference/c-function-xsnprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/style.c#L294)

## Other function references

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

## Referenced by

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

## Referenced declarations

- [`style.align`](/en/tmux/latest/reference/c-struct-style-align/) (attribute)
- [`grid_cell.attr`](/en/tmux/latest/reference/c-struct-grid_cell-attr/) (attribute)
- [`grid_cell.bg`](/en/tmux/latest/reference/c-struct-grid_cell-bg/) (attribute)
- [`style.default_type`](/en/tmux/latest/reference/c-struct-style-default_type/) (attribute)
- [`grid_cell.fg`](/en/tmux/latest/reference/c-struct-grid_cell-fg/) (attribute)
- [`style.fill`](/en/tmux/latest/reference/c-struct-style-fill/) (attribute)
- [`style.gc`](/en/tmux/latest/reference/c-struct-style-gc/) (attribute)
- [`style.list`](/en/tmux/latest/reference/c-struct-style-list/) (attribute)
- [`style.pad`](/en/tmux/latest/reference/c-struct-style-pad/) (attribute)
- [`style.range_argument`](/en/tmux/latest/reference/c-struct-style-range_argument/) (attribute)
- [`style.range_string`](/en/tmux/latest/reference/c-struct-style-range_string/) (attribute)
- [`style.range_type`](/en/tmux/latest/reference/c-struct-style-range_type/) (attribute)
- [`style`](/en/tmux/latest/reference/c-struct-style/) (struct)
- [`STYLE_ALIGN_ABSOLUTE_CENTRE`](/en/tmux/latest/reference/c-enum-style_align-style_align_absolute_centre/) (constant)
- [`STYLE_ALIGN_CENTRE`](/en/tmux/latest/reference/c-enum-style_align-style_align_centre/) (constant)
- [`STYLE_ALIGN_DEFAULT`](/en/tmux/latest/reference/c-enum-style_align-style_align_default/) (constant)
- [`STYLE_ALIGN_LEFT`](/en/tmux/latest/reference/c-enum-style_align-style_align_left/) (constant)
- [`STYLE_ALIGN_RIGHT`](/en/tmux/latest/reference/c-enum-style_align-style_align_right/) (constant)
- [`STYLE_DEFAULT_BASE`](/en/tmux/latest/reference/c-enum-style_default_type-style_default_base/) (constant)
- [`STYLE_DEFAULT_POP`](/en/tmux/latest/reference/c-enum-style_default_type-style_default_pop/) (constant)
- [`STYLE_DEFAULT_PUSH`](/en/tmux/latest/reference/c-enum-style_default_type-style_default_push/) (constant)
- [`STYLE_DEFAULT_SET`](/en/tmux/latest/reference/c-enum-style_default_type-style_default_set/) (constant)
- [`STYLE_LIST_FOCUS`](/en/tmux/latest/reference/c-enum-style_list-style_list_focus/) (constant)
- [`STYLE_LIST_LEFT_MARKER`](/en/tmux/latest/reference/c-enum-style_list-style_list_left_marker/) (constant)
- [`STYLE_LIST_OFF`](/en/tmux/latest/reference/c-enum-style_list-style_list_off/) (constant)
- [`STYLE_LIST_ON`](/en/tmux/latest/reference/c-enum-style_list-style_list_on/) (constant)
- [`STYLE_LIST_RIGHT_MARKER`](/en/tmux/latest/reference/c-enum-style_list-style_list_right_marker/) (constant)
- [`STYLE_RANGE_LEFT`](/en/tmux/latest/reference/c-enum-style_range_type-style_range_left/) (constant)
- [`STYLE_RANGE_NONE`](/en/tmux/latest/reference/c-enum-style_range_type-style_range_none/) (constant)
- [`STYLE_RANGE_PANE`](/en/tmux/latest/reference/c-enum-style_range_type-style_range_pane/) (constant)
- [`STYLE_RANGE_RIGHT`](/en/tmux/latest/reference/c-enum-style_range_type-style_range_right/) (constant)
- [`STYLE_RANGE_SESSION`](/en/tmux/latest/reference/c-enum-style_range_type-style_range_session/) (constant)
- [`STYLE_RANGE_USER`](/en/tmux/latest/reference/c-enum-style_range_type-style_range_user/) (constant)
- [`STYLE_RANGE_WINDOW`](/en/tmux/latest/reference/c-enum-style_range_type-style_range_window/) (constant)
- [`grid_cell.us`](/en/tmux/latest/reference/c-struct-grid_cell-us/) (attribute)
- [`style.width`](/en/tmux/latest/reference/c-struct-style-width/) (attribute)
- [`style.width_percentage`](/en/tmux/latest/reference/c-struct-style-width_percentage/) (attribute)
