Fix: Replace deprecated getBrightness with new method

New method created in is_themecore module: Uses use PrestaShop\PrestaShop\Core\Util\ColorBrightnessCalculator and adds as smarty function in SmartyHelperFunctions.php
This commit is contained in:
2025-11-19 17:14:56 +01:00
parent 6849b8eefd
commit ae299283a7
4 changed files with 4 additions and 4 deletions

View File

@ -75,7 +75,7 @@
type="{if $facet.multipleSelectionAllowed}checkbox{else}radio{/if}" class="custom-control-input"
{if $filter.active } checked{/if}>
<label for="facet_input_{$_expand_id}_{$filter_key}" {if isset($filter.properties.color)}
class="custom-control-label custom-control-label-{if Tools::getBrightness($filter.properties.color) > 128}dark{else}bright{/if}"
class="custom-control-label custom-control-label-{if $filter.properties.color|is_bright}dark{else}bright{/if}"
{else} class="custom-control-label"
{/if}>
{if isset($filter.properties.color)}