We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 781a878 commit a003c0cCopy full SHA for a003c0c
1 file changed
scripts/eslint-report.ts
@@ -62,7 +62,7 @@ const CHART_RULE_PALETTE = [
62
];
63
64
/** Encode #RRGGBB + alpha for Chart.js / CSS. */
65
-const hexWithAlpha = (hex: string, alpha: number): string => {
+const hexToRGBA = (hex: string, alpha: number): string => {
66
const n = hex.replace('#', '');
67
const r = Number.parseInt(n.slice(0, 2), 16);
68
const g = Number.parseInt(n.slice(2, 4), 16);
@@ -84,9 +84,9 @@ type ChartUiPayload = {
84
85
const buildChartUiPayload = (): ChartUiPayload => ({
86
totalLine: REPORT_THEME.accent,
87
- totalFill: hexWithAlpha(REPORT_THEME.accent, 0.12),
+ totalFill: hexToRGBA(REPORT_THEME.accent, 0.12),
88
tick: colors.productDark800,
89
- grid: hexWithAlpha(colors.productDark700, 0.35),
+ grid: hexToRGBA(colors.productDark700, 0.35),
90
legend: colors.productDark900,
91
tooltipBg: colors.productDark400,
92
tooltipBorder: colors.productDark500,
0 commit comments