{%- if color_filled == blank -%}
    {% assign color_filled = settings.color_review_stars_filled | color_to_hex %}
{%- endif -%}
{%- if color_empty == blank -%}
    {% assign color_empty = settings.color_review_stars_empty | color_to_hex %}
{%- endif -%}

{%- if stars < 0.5 -%}
    {% render 'icon-star-empty', color: color_empty, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
{%- elsif stars < 1 -%}
    {% assign half_id = id | append: '0.5' %}
    {% render 'icon-star-half', color_filled: color_filled, color_empty: color_empty id: half_id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
{%- elsif stars < 1.5 -%}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
{%- elsif stars < 2 -%}
    {% assign half_id = id | append: '1.5' %}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star-half', color_filled: color_filled, color_empty: color_empty id: half_id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
{%- elsif stars < 2.5 -%}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
{%- elsif stars < 3 -%}
    {% assign half_id = id | append: '2.5' %}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star-half', color_filled: color_filled, color_empty: color_empty id: half_id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
{%- elsif stars < 3.5 -%}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
{%- elsif stars < 4 -%}
    {% assign half_id = id | append: '3.5' %}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star-half', color_filled: color_filled, color_empty: color_empty id: half_id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
{%- elsif stars < 4.5 -%}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star-empty', color: color_empty, id: id %}
{%- elsif stars < 5 -%}
    {% assign half_id = id | append: '4.5' %}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star-half', color_filled: color_filled, color_empty: color_empty id: half_id %}
{%- else -%}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star', color: color_filled, id: id %}
    {% render 'icon-star', color: color_filled, id: id %}
{%- endif -%}