tmux  3.2a
About: tmux is a terminal multiplexer that lets you switch easily between several programs in one terminal.
  Fossies Dox: tmux-3.2a.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

colour.c File Reference
#include <sys/types.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "tmux.h"
Include dependency graph for colour.c:

Go to the source code of this file.

Functions

static int colour_dist_sq (int R, int G, int B, int r, int g, int b)
 
static int colour_to_6cube (int v)
 
int colour_find_rgb (u_char r, u_char g, u_char b)
 
int colour_join_rgb (u_char r, u_char g, u_char b)
 
void colour_split_rgb (int c, u_char *r, u_char *g, u_char *b)
 
const char * colour_tostring (int c)
 
int colour_fromstring (const char *s)
 
int colour_256toRGB (int c)
 
int colour_256to16 (int c)
 
int colour_byname (const char *name)
 

Function Documentation

◆ colour_256to16()

int colour_256to16 ( int  c)

Definition at line 319 of file colour.c.

Referenced by tty_check_bg(), and tty_check_fg().

◆ colour_256toRGB()

int colour_256toRGB ( int  c)

Definition at line 245 of file colour.c.

References COLOUR_FLAG_RGB.

Referenced by tty_check_us().

◆ colour_byname()

int colour_byname ( const char *  name)

Definition at line 345 of file colour.c.

References COLOUR_FLAG_RGB, colour_join_rgb(), name, and nitems.

Referenced by colour_fromstring(), and input_osc_parse_colour().

◆ colour_dist_sq()

static int colour_dist_sq ( int  R,
int  G,
int  B,
int  r,
int  g,
int  b 
)
static

Definition at line 30 of file colour.c.

Referenced by colour_find_rgb().

◆ colour_find_rgb()

int colour_find_rgb ( u_char  r,
u_char  g,
u_char  b 
)

Definition at line 58 of file colour.c.

References colour_dist_sq(), COLOUR_FLAG_256, and colour_to_6cube().

Referenced by tty_check_bg(), and tty_check_fg().

◆ colour_fromstring()

int colour_fromstring ( const char *  s)

Definition at line 172 of file colour.c.

References colour_byname(), COLOUR_FLAG_256, colour_join_rgb(), and strtonum().

Referenced by options_from_string(), and style_parse().

◆ colour_join_rgb()

int colour_join_rgb ( u_char  r,
u_char  g,
u_char  b 
)

◆ colour_split_rgb()

void colour_split_rgb ( int  c,
u_char *  r,
u_char *  g,
u_char *  b 
)

◆ colour_to_6cube()

static int colour_to_6cube ( int  v)
static

Definition at line 36 of file colour.c.

Referenced by colour_find_rgb().

◆ colour_tostring()