UPD: Light color detection

This commit is contained in:
Robert Kossessa
2024-02-05 15:32:56 +01:00
parent 8de2e7d1eb
commit 1f3b242392

View File

@@ -6,7 +6,7 @@
:style="{backgroundColor: color.hex()}">
<div
ref="colorFieldText" class="w-full flex opacity-70"
:class="color.lighten(0.37).isLight() ? 'text-black selection:bg-black selection:text-white' : 'selection:bg-white selection:text-black'"
:class="color.isLight() ? 'text-black selection:bg-black selection:text-white' : 'selection:bg-white selection:text-black'"
style="transition: color 0.2s ease-in-out">
<div>
<form @submit.prevent="onSubmitHueInput">