JacquesLucke / gcov-viewer

Show code coverage data generated with gcov in Visual Studio code.
MIT License
31 stars 9 forks source link

Configurable Colors / Colorblind Compatibility #24

Open VoltCruelerz opened 1 year ago

VoltCruelerz commented 1 year ago

As I am colorblind, the green and red used here are nearly indistinguishable.

This is the relevant snippet in extension.ts

const calledLineColor = "rgba(50, 240, 50, 0.1)";
const calledLinesDecorationType = vscode.window.createTextEditorDecorationType({
  isWholeLine: true,
  backgroundColor: calledLineColor,
  overviewRulerColor: calledLineColor,
  rangeBehavior: vscode.DecorationRangeBehavior.ClosedClosed,
});

const missedLineColor = "rgba(240, 50, 50, 0.1)";
const missedLinesDecorationType = vscode.window.createTextEditorDecorationType({
  isWholeLine: true,
  backgroundColor: missedLineColor,
  overviewRulerColor: missedLineColor,
  rangeBehavior: vscode.DecorationRangeBehavior.ClosedClosed,
});

It would be appreciated if they could be configured in the settings.

VoltCruelerz commented 1 year ago

for example, these settings are more clear to me: image

const calledLineColor = "rgba(50, 50, 240, 0.2)";
const missedLineColor = "rgba(240, 240, 50, 0.2)";
usmanmehmoodSSP commented 1 year ago

Hi.

Although I am not colorblind, the shades of green and red used by the dev are wayyy to light to be easily noticeable. It'd be great if they can make it a configurable setting.

Happy to contribute if I knew where to start 😅