Add colour contrast filter

Make colours on images yoinkable
This commit is contained in:
Michał Gdula 2023-04-22 14:11:25 +00:00
parent 76cc8456d2
commit 13a0b21710
4 changed files with 41 additions and 5 deletions

View file

@ -158,7 +158,9 @@
</table>
<div class="img-colours">
{% for col in image.colours %}
<span style="background-color: rgb({{col.0}}, {{col.1}}, {{col.2}})"></span>
<button style="background-color: rgb{{ col }}" onclick="copyToClipboard('rgb{{ col }}')">
<i class="ph-fill ph-paint-bucket" style="{{ col|colour_contrast }}"></i>
</button>
{% endfor %}
</div>
{% if image.groups %}