# colour_byname

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

```c
int colour_byname(const char *name)
```

## Parameters

- `name` (`const char *`)

## Called by

- [`colour_fromstring`](/en/tmux/3.7c/reference/c-function-colour_fromstring/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/colour.c#L295)
- [`colour_parseX11`](/en/tmux/3.7c/reference/c-function-colour_parsex11/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/colour.c#L1042)

## Calls

- [`colour_join_rgb`](/en/tmux/3.7c/reference/c-function-colour_join_rgb/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/colour.c#L999)
- [`strtonum`](/en/tmux/3.7c/reference/c-function-strtonum/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/colour.c#L993)

## Referenced declarations

- [`COLOUR_FLAG_RGB`](/en/tmux/3.7c/reference/c-define-tmux-h-colour_flag_rgb/) (constant)
- [`nitems`](/en/tmux/3.7c/reference/c-define-tmux-h-nitems/) (constant)
