Lines Matching refs:col
36 static void lookup_colour_ansi(const VTermState *state, long index, VTermColor *col)
39 *col = state->colors[index];
43 static void lookup_colour_palette(const VTermState *state, long index, VTermColor *col)
47 lookup_colour_ansi(state, index, col);
53 col->blue = ramp6[index % 6];
54 col->green = ramp6[index/6 % 6];
55 col->red = ramp6[index/6/6 % 6];
61 col->red = ramp24[index];
62 col->green = ramp24[index];
63 col->blue = ramp24[index];
67 static int lookup_colour(const VTermState *state, int palette, const long args[], int argcount, VTermColor *col, int *index)
74 col->red = CSI_ARG(args[0]);
75 col->green = CSI_ARG(args[1]);
76 col->blue = CSI_ARG(args[2]);
84 lookup_colour_palette(state, argcount ? CSI_ARG_OR(args[0], -1) : -1, col);
127 static void set_pen_col_ansi(VTermState *state, VTermAttr attr, long col)
131 lookup_colour_ansi(state, col, colp);
142 for(int col = 0; col < 16; col++)
143 state->colors[col] = ansi_colors[col];
188 void vterm_state_get_palette_color(const VTermState *state, int index, VTermColor *col)
190 lookup_colour_palette(state, index, col);
199 void vterm_state_set_palette_color(VTermState *state, int index, const VTermColor *col)
202 state->colors[index] = *col;