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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user