[FIX] web: fix wrong convertion of 8-digit hex to RGBA color
closes odoo/odoo#40991 X-original-commit: fdfce09ea5312d42379c58b334ea0ed22b8ddbfa Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -421,7 +421,7 @@ ColorpickerDialog.convertHexToRgba = function (hex) {
|
||||
red: parseInt(hex.substr(1, 2), 16),
|
||||
green: parseInt(hex.substr(3, 2), 16),
|
||||
blue: parseInt(hex.substr(5, 2), 16),
|
||||
opacity: hex.length === 9 ? parseInt(hex.substr(7, 2), 16) : 100,
|
||||
opacity: (hex.length === 9 ? (parseInt(hex.substr(7, 2), 16) / 255) : 1) * 100,
|
||||
};
|
||||
};
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user