Skip to content

Commit c7c231a

Browse files
committed
fixing potential 7 char hex color causing issue
1 parent bf99e40 commit c7c231a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/www/src/registry/ui/remote-cursor-overlay.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,5 +120,5 @@ function Caret({
120120
function addAlpha(hexColor: string, opacity: number): string {
121121
const normalized = Math.round(Math.min(Math.max(opacity, 0), 1) * 255);
122122

123-
return hexColor + normalized.toString(16).toUpperCase();
123+
return hexColor + normalized.toString(16).padStart(2, '0').toUpperCase();
124124
}

0 commit comments

Comments
 (0)