# style_parse

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/style.c#L60
- **Page:** https://libtmux.org/en/tmux/latest/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/latest/reference/c-function-format_draw/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format-draw.c#L827)
- [`menu_reapply_styles`](/en/tmux/latest/reference/c-function-menu-c-menu_reapply_styles/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/menu.c#L224)
- [`options_string_to_style`](/en/tmux/latest/reference/c-function-options_string_to_style/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options.c#L998)
- [`popup_display`](/en/tmux/latest/reference/c-function-popup_display/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/popup.c#L828)
- [`popup_modify`](/en/tmux/latest/reference/c-function-popup_modify/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/popup.c#L739)
- [`popup_reapply_styles`](/en/tmux/latest/reference/c-function-popup-c-popup_reapply_styles/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/popup.c#L147)

## Calls

- [`attributes_fromstring`](/en/tmux/latest/reference/c-function-attributes_fromstring/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/style.c#L232)
- [`log_debug`](/en/tmux/latest/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/style.c#L73)
- [`strtonum`](/en/tmux/latest/reference/c-function-strtonum/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/style.c#L143)
- [`style_copy`](/en/tmux/latest/reference/c-function-style_copy/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/style.c#L71)
- [`style_set_range_string`](/en/tmux/latest/reference/c-function-style-c-style_set_range_string/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/style.c#L133)

## Other function references

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

## Referenced by

- [`options_from_string_check`](/en/tmux/latest/reference/c-function-options-c-options_from_string_check/) (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)
- [`grid_cell.flags`](/en/tmux/latest/reference/c-struct-grid_cell-flags/) (attribute)
- [`style.gc`](/en/tmux/latest/reference/c-struct-style-gc/) (attribute)
- [`GRID_ATTR_NOATTR`](/en/tmux/latest/reference/c-define-tmux-h-grid_attr_noattr/) (constant)
- [`grid_cell`](/en/tmux/latest/reference/c-struct-grid_cell/) (struct)
- [`style.ignore`](/en/tmux/latest/reference/c-struct-style-ignore/) (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_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`](/en/tmux/latest/reference/c-variable-style-c-style_default/) (attribute)
- [`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_CONTROL`](/en/tmux/latest/reference/c-enum-style_range_type-style_range_control/) (constant)
- [`STYLE_RANGE_LEFT`](/en/tmux/latest/reference/c-enum-style_range_type-style_range_left/) (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)
