Brighten to Normal

The image starts darkened and restores normal brightness on hover/focus.

Brighten to Normal demo

Hover or focus the image to see the effect.

HTML

description

CSS

.hover-effect.brighten-to-normal img{
  filter: brightness(0.6);
  transition: filter 0.5s ease;
}
.hover-effect.brighten-to-normal:hover img,
.hover-effect.brighten-to-normal:focus-visible img{
  filter: brightness(1);
}
@media (prefers-reduced-motion: reduce) {
  .hover-effect.brighten-to-normal img{
    transition: none;
  }
  .hover-effect.brighten-to-normal:hover img,
  .hover-effect.brighten-to-normal:focus-visible img{
    filter: brightness(1);
  }
}

The animates filter: brightness() from 0.6 to 1 (inverse of darken). Select the code and copy with Ctrl+C or ⌘C.