# colour_fromstring

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

```c
int colour_fromstring(const char *s)
```

## Parameters

- `s` (`const char *`)

## Called by

- [`format_replace`](/en/tmux/latest/reference/c-function-format-c-format_replace/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L5302)

## Calls

- [`colour_byname`](/en/tmux/latest/reference/c-function-colour_byname/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/colour.c#L295)
- [`colour_join_rgb`](/en/tmux/latest/reference/c-function-colour_join_rgb/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/colour.c#L242)
- [`strtonum`](/en/tmux/latest/reference/c-function-strtonum/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/colour.c#L246)

## Referenced by

- [`options_array_set`](/en/tmux/latest/reference/c-function-options_array_set/) (function)
- [`options_from_string`](/en/tmux/latest/reference/c-function-options_from_string/) (function)
- [`style_parse`](/en/tmux/latest/reference/c-function-style_parse/) (function)

## Referenced declarations

- [`COLOUR_FLAG_256`](/en/tmux/latest/reference/c-define-tmux-h-colour_flag_256/) (constant)
