Skip to content

Commit a003c0c

Browse files
committed
refactor(scripts): rename hexWithAlpha to hexToRGBA in eslint-report
Made-with: Cursor
1 parent 781a878 commit a003c0c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

scripts/eslint-report.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const CHART_RULE_PALETTE = [
6262
];
6363

6464
/** Encode #RRGGBB + alpha for Chart.js / CSS. */
65-
const hexWithAlpha = (hex: string, alpha: number): string => {
65+
const hexToRGBA = (hex: string, alpha: number): string => {
6666
const n = hex.replace('#', '');
6767
const r = Number.parseInt(n.slice(0, 2), 16);
6868
const g = Number.parseInt(n.slice(2, 4), 16);
@@ -84,9 +84,9 @@ type ChartUiPayload = {
8484

8585
const buildChartUiPayload = (): ChartUiPayload => ({
8686
totalLine: REPORT_THEME.accent,
87-
totalFill: hexWithAlpha(REPORT_THEME.accent, 0.12),
87+
totalFill: hexToRGBA(REPORT_THEME.accent, 0.12),
8888
tick: colors.productDark800,
89-
grid: hexWithAlpha(colors.productDark700, 0.35),
89+
grid: hexToRGBA(colors.productDark700, 0.35),
9090
legend: colors.productDark900,
9191
tooltipBg: colors.productDark400,
9292
tooltipBorder: colors.productDark500,

0 commit comments

Comments
 (0)