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:
@ -45,7 +45,7 @@
|
||||
<div class="custom-control custom-radio-color">
|
||||
<input class="custom-control-input" type="radio" data-product-attribute="{$id_attribute_group}" id="{$id_attribute_group}_{$id_attribute}" name="group[{$id_attribute_group}]" value="{$id_attribute}" title="{$group_attribute.name}"{if $group_attribute.selected} checked="checked"{/if}>
|
||||
|
||||
<label class="custom-control-label {if $group_attribute.html_color_code}custom-control-label-{if Tools::getBrightness($group_attribute.html_color_code) > 128}dark{else}bright{/if}{/if}" for="{$id_attribute_group}_{$id_attribute}" aria-label="{$group_attribute.name}">
|
||||
<label class="custom-control-label {if $group_attribute.html_color_code}custom-control-label-{if $group_attribute.html_color_code|is_bright}dark{else}bright{/if}{/if}" for="{$id_attribute_group}_{$id_attribute}" aria-label="{$group_attribute.name}">
|
||||
<span
|
||||
{if $group_attribute.texture}
|
||||
class="custom-control-input-color" style="background-image: url({$group_attribute.texture})"
|
||||
|
||||
Reference in New Issue
Block a user