Zotero Yellow highlight

Hello all,

I use the Zotero plugin to get data over and I use the following lines in the template to get these highlights in Obsidian.

## Annotations 
{% for annotation in annotations -%}{%- if annotation.annotatedText -%}{% if 'Purple' in annotation.colorCategory %} 
##### {{annotation.annotatedText | escape }}{% else %} 
<mark class="customZot-{% if annotation.color %}{{annotation.colorCategory}} {% endif %}">{{annotation.annotatedText | escape }}</mark> ([{{annotation.page}}](zotero://open-pdf/library/items/{{annotation.attachment.itemKey}}?page={{annotation.page}}&annotation={{annotation.id}}))
{% endif %}{%- endif %} {% if annotation.imageRelativePath %} ![[{{annotation.imageRelativePath}}]] {% endif %}{% if annotation.comment %}
>*{{annotation.comment}}* 
{% endif %}{% endfor -%}

Everything I highlight in Yellow (in zotero) are things I want to see in Obsidian but not highlighted in Obsidian. Red and other colors is something I want to highlight.

How could I solve this with the template and CSS ?

.customZot-Yellow {
    background-color: rgba(255, 204, 0, 0.212) !important;
}

.customZot-Green {
    background-color: rgba(0, 255, 47, 0.215) !important;
}

.customZot-Blue {
    background-color: rgba(0, 0, 255, 0.187) !important;
}

.customZot-Purple {
    background-color: purple !important;
}

Any advise is helpful.

Greetings,

I will close this one… I did not realise at the time of asking that the RGBs can also be ‘no color’.

So, I changes this :

.customZot-Yellow {
background-color: rgba(255, 204, 0, 0.212) !important;
}

to

.customZot-Yellow {
background-color: rgba(0, 0, 0, 0) !important;
}

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.