diff --git a/material/base.html b/material/base.html
index 9a2bc86d5..eba223e61 100644
--- a/material/base.html
+++ b/material/base.html
@@ -54,8 +54,10 @@
{% endif %}
{% if palette.primary %}
{% import "partials/palette.html" as map %}
- {% set color = map.primary(palette.primary) %}
-
+ {% set primary = map.primary(
+ palette.primary | replace(" ", "-") | lower
+ ) %}
+
{% endif %}
{% endblock %}
{% block libs %}
diff --git a/src/base.html b/src/base.html
index 73faecfa1..30040f223 100644
--- a/src/base.html
+++ b/src/base.html
@@ -110,8 +110,10 @@
{% if palette.primary %}
{% import "partials/palette.html" as map %}
- {% set color = map.primary(palette.primary) %}
-
+ {% set primary = map.primary(
+ palette.primary | replace(" ", "-") | lower
+ ) %}
+
{% endif %}
{% endblock %}