Skip to content

Commit

Permalink
fix text color in hex field
Browse files Browse the repository at this point in the history
  • Loading branch information
saboooor committed Aug 26, 2024
1 parent d75aa81 commit 364f400
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/routes/resources/animtab/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export default component$(() => {
store.colorlength--;
}}
>
{t('color.colorLength@@Color Length')}
{t('color.colorLength@@Characters per color')}
</NumberInput>
<NumberInput input min={2} max={store.text.length} value={store.colors.length} id="colorsinput" class={{ 'w-full': true }}
onChange$={(e, el) => {
Expand Down Expand Up @@ -407,8 +407,8 @@ export default component$(() => {
<label for={`colorlist-color-${i + 1}`}>{t('color.color@@Color')} {i + 1}</label>
<input key={`colorlist-color-${i + 1}-${color.hex}`} id={`colorlist-color-${i + 1}`}
class={{
'text-gray-400': getBrightness(convertToRGB(color.hex)) < 126,
'text-gray-700': getBrightness(convertToRGB(color.hex)) > 126,
'text-gray-400 hover:text-gray-400': getBrightness(convertToRGB(color.hex)) < 126,
'text-gray-700 hover:text-gray-700': getBrightness(convertToRGB(color.hex)) > 126,
'lum-input w-full lum-pad-xs hover:': true,
}}
style={`background: ${color.hex};`}
Expand Down
4 changes: 2 additions & 2 deletions src/routes/resources/rgb/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ export default component$(() => {
<label for={`colorlist-color-${i + 1}`}>{t('color.color@@Color')} {i + 1}</label>
<input key={`colorlist-color-${i + 1}-${color.hex}`} id={`colorlist-color-${i + 1}`}
class={{
'text-gray-400': getBrightness(convertToRGB(color.hex)) < 126,
'text-gray-700': getBrightness(convertToRGB(color.hex)) > 126,
'text-gray-400 hover:text-gray-400': getBrightness(convertToRGB(color.hex)) < 126,
'text-gray-700 hover:text-gray-700': getBrightness(convertToRGB(color.hex)) > 126,
'lum-input w-full lum-pad-xs hover:': true,
}}
style={`background: ${color.hex};`}
Expand Down

0 comments on commit 364f400

Please sign in to comment.