<div class="attribute-color">
    {% for attribute in group.attributes|sort((a, b) => a.attribute.sorting <=> b.attribute.sorting) %}
        {% if loop.index0 < 3 %}
            <div data-bs-toggle="tooltip" title="{{ attribute.attribute.name }}" class="attribute-color__item" style="--bs-product-color: {{ attribute.attribute.valueColor }}"></div>
        {% endif %}
    {% endfor %}
    {% if group.attributes|length > 3 %}
        <span class="ms-_5 fs-lead fs-lg-5 lh-1">
            <strong>+ {{ group.attributes|length - 3 }}</strong>
        </span>
    {% endif %}
</div>