1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-25 00:24:11 +02:00

chore(frontend): getHexで不正な値が返される可能性があるのを修正

This commit is contained in:
syuilo
2026-02-22 13:56:20 +09:00
parent 97f7659bac
commit 264068c58b
2 changed files with 3 additions and 3 deletions

View File

@@ -64,7 +64,7 @@ defineProps<{
const params = defineModel<Record<string, any>>({ required: true });
function getHex(c: ImageEffectorRGB) {
return `#${c.map(x => (x * 255).toString(16).padStart(2, '0')).join('')}`;
return `#${c.map(x => Math.round(x * 255).toString(16).padStart(2, '0')).join('')}`;
}
function getRgb(hex: string | number): ImageEffectorRGB | null {