UPD: HSLPicker selection color follows bg

This commit is contained in:
Robert Kossessa
2024-01-25 17:19:30 +01:00
parent dbb78d15ad
commit ce277e97eb

View File

@@ -257,10 +257,11 @@ function shake() {
<div> <div>
<div <div
class="w-full flex p-4 font-heading" class="w-full flex p-4 font-heading"
:style="{backgroundColor: `hsl(${hue},${saturation}%,${lightness}%)`}" :style="{backgroundColor: `hsl(${hue},${saturation}%,${lightness}%)`}">
style="transition: color 0.2s ease-in-out" <div
:class="{'text-black': foregroundBlack(...rgb)}"> ref="colorFieldText" class="w-full flex opacity-50"
<div ref="colorFieldText" class="w-full flex opacity-50"> :class="foregroundBlack(...rgb) ? 'text-black selection:bg-black selection:text-white' : 'selection:bg-white selection:text-black'"
style="transition: color 0.2s ease-in-out">
<div> <div>
<form @submit.prevent="onSubmitHueInput"> <form @submit.prevent="onSubmitHueInput">
<label for="hueInput">H: </label><input <label for="hueInput">H: </label><input