Custom classes in archives plugin

I would like to use a custom class in the archives plugin, specifically the following:
<span class = “{{taxonomy_color}}”>

And in blog.html.twig:

{% set taxonomy_color = page.header.content.taxonomy_color %}

I have the following in the blog blueprint:

        type: select
        label: Taxonomy color
        size: small
            blue: 'Blue'
            green: 'Green'
            yellow: 'Yellow'
            orange: 'Orange'

Am I defining the variable in the correct file, or should I define it in partials / archives.html.twig ?. I have tried both and it doesn’t work.
Where should I define this variable?


Ok. I’ve found the solution:

First, in blog.html.twig I have defined one variable:

{% set taxonomy_color = page.header.content.taxonomy_color %}.

In the same file, I’ve include the archives.html.twig with that variable:

{% include ‘partials/archives.html.twig’ with {‘base_url’:new_base_url, ‘taxonomy_color’: taxonomy_color} %}

Finally, in archives.html.twig or taxonomylist.html.twig I’ve used taxonomy_color variable in a span tag (for example):

<span class=“label label-rounded label-{{taxonomy_color}}”>

That’s all. It was really easy.