Skip to content

Commit 1c825f0

Browse files
authored
Merge pull request #4705 from YuDavidCao/fix/generate-alpha-color
2 parents bf99e40 + c7c231a commit 1c825f0

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)