From bbac3ef7ac4c3cecfb8253b60d46f393663301b4 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Thu, 23 Mar 2023 19:42:24 +0100 Subject: [PATCH] Update 0BDFDB.plugin.js --- Library/0BDFDB.plugin.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index f892494f14..eac61a4967 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -2,7 +2,7 @@ * @name BDFDB * @author DevilBro * @authorId 278543574059057154 - * @version 3.1.9 + * @version 3.2.0 * @description Required Library for DevilBro's Plugins * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -3371,12 +3371,13 @@ module.exports = (_ => { return parseInt(compare) < Math.sqrt(0.299 * color[0]**2 + 0.587 * color[1]**2 + 0.144 * color[2]**2); }; BDFDB.ColorUtils.getType = function (color) { - if (color != null) { + if (color !== null) { if (typeof color === "object" && (color.length == 3 || color.length == 4)) { if (isRGB(color)) return "RGBCOMP"; else if (isHSL(color)) return "HSLCOMP"; } else if (typeof color === "string") { + color = color.replace(/calc\(.+\s*\*\s*([0-9\.\%]+)\)/g, "$1"); if (/^#[a-f\d]{3}$|^#[a-f\d]{6}$/i.test(color)) return "HEX"; else if (/^#[a-f\d]{4}$|^#[a-f\d]{8}$/i.test(color)) return "HEXA"; else {