options_colors: compute pre-multiplied colors

This commit is contained in:
Boris Faure 2018-01-15 23:28:18 +01:00
parent f33e898e29
commit 8c09ee5c88
1 changed files with 3 additions and 3 deletions

View File

@ -92,9 +92,9 @@ _cb_op_color_chg(void *data,
continue;
if (ctx->colitem[j][i] == ctx->curitem)
{
config->colors[(j * 12) + i].r = r;
config->colors[(j * 12) + i].g = g;
config->colors[(j * 12) + i].b = b;
config->colors[(j * 12) + i].r = r * a / 256;
config->colors[(j * 12) + i].g = g * a / 256;
config->colors[(j * 12) + i].b = b * a / 256;
config->colors[(j * 12) + i].a = a;
termio_config_update(ctx->term);
config_save(config, NULL);