# style_parse

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

```c
int style_parse(struct style *sy, const struct grid_cell *base, const char *in)
```

## Parameters

- `sy` (`struct style *`)
- `base` (`const struct grid_cell *`)
- `in` (`const char *`)

## Called by

- [`format_draw`](/en/tmux/3.2a/reference/c-function-format_draw/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/format-draw.c#L783)
- [`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/options.c#L920)

## Calls

- [`log_debug`](/en/tmux/3.2a/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/style.c#L63)
- [`style_copy`](/en/tmux/3.2a/reference/c-function-style_copy/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/style.c#L61)

## Other function references

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

## Referenced by

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

## Referenced declarations

- [`style.align`](/en/tmux/3.2a/reference/c-struct-style-align/) (attribute)
- [`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)
- [`style.default_type`](/en/tmux/3.2a/reference/c-struct-style-default_type/) (attribute)
- [`grid_cell.fg`](/en/tmux/3.2a/reference/c-struct-grid_cell-fg/) (attribute)
- [`style.fill`](/en/tmux/3.2a/reference/c-struct-style-fill/) (attribute)
- [`grid_cell.flags`](/en/tmux/3.2a/reference/c-struct-grid_cell-flags/) (attribute)
- [`style.gc`](/en/tmux/3.2a/reference/c-struct-style-gc/) (attribute)
- [`grid_cell`](/en/tmux/3.2a/reference/c-struct-grid_cell/) (struct)
- [`style.ignore`](/en/tmux/3.2a/reference/c-struct-style-ignore/) (attribute)
- [`style.list`](/en/tmux/3.2a/reference/c-struct-style-list/) (attribute)
- [`style.range_argument`](/en/tmux/3.2a/reference/c-struct-style-range_argument/) (attribute)
- [`style.range_type`](/en/tmux/3.2a/reference/c-struct-style-range_type/) (attribute)
- [`style`](/en/tmux/3.2a/reference/c-struct-style/) (struct)
- [`STYLE_ALIGN_ABSOLUTE_CENTRE`](/en/tmux/3.2a/reference/c-enum-style_align-style_align_absolute_centre/) (constant)
- [`STYLE_ALIGN_CENTRE`](/en/tmux/3.2a/reference/c-enum-style_align-style_align_centre/) (constant)
- [`STYLE_ALIGN_LEFT`](/en/tmux/3.2a/reference/c-enum-style_align-style_align_left/) (constant)
- [`STYLE_ALIGN_RIGHT`](/en/tmux/3.2a/reference/c-enum-style_align-style_align_right/) (constant)
- [`style_default`](/en/tmux/3.2a/reference/c-variable-style-c-style_default/) (attribute)
- [`STYLE_DEFAULT_POP`](/en/tmux/3.2a/reference/c-enum-style_default_type-style_default_pop/) (constant)
- [`STYLE_DEFAULT_PUSH`](/en/tmux/3.2a/reference/c-enum-style_default_type-style_default_push/) (constant)
- [`STYLE_LIST_FOCUS`](/en/tmux/3.2a/reference/c-enum-style_list-style_list_focus/) (constant)
- [`STYLE_LIST_LEFT_MARKER`](/en/tmux/3.2a/reference/c-enum-style_list-style_list_left_marker/) (constant)
- [`STYLE_LIST_OFF`](/en/tmux/3.2a/reference/c-enum-style_list-style_list_off/) (constant)
- [`STYLE_LIST_ON`](/en/tmux/3.2a/reference/c-enum-style_list-style_list_on/) (constant)
- [`STYLE_LIST_RIGHT_MARKER`](/en/tmux/3.2a/reference/c-enum-style_list-style_list_right_marker/) (constant)
- [`STYLE_RANGE_LEFT`](/en/tmux/3.2a/reference/c-enum-style_range_type-style_range_left/) (constant)
- [`STYLE_RANGE_RIGHT`](/en/tmux/3.2a/reference/c-enum-style_range_type-style_range_right/) (constant)
- [`STYLE_RANGE_WINDOW`](/en/tmux/3.2a/reference/c-enum-style_range_type-style_range_window/) (constant)
