# Image occlusion masks are slightly blurry and have low border contrast in dark mode

**URL:** <https://forums.ankiweb.net/t/image-occlusion-masks-are-slightly-blurry-and-have-low-border-contrast-in-dark-mode/58694>\
**Category:** Suggestions\
**Created:** [April 8, 2025, 10:51am UTC](https://forums.ankiweb.net/t/image-occlusion-masks-are-slightly-blurry-and-have-low-border-contrast-in-dark-mode/58694 "2025-04-08T10:51:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![WobbleTread](https://avatars.discourse-cdn.com/v4/letter/w/e9a140/32.png) [@WobbleTread](https://forums.ankiweb.net/u/WobbleTread)\
**Post date:** [April 8, 2025, 10:51am UTC](https://forums.ankiweb.net/t/image-occlusion-masks-are-slightly-blurry-and-have-low-border-contrast-in-dark-mode/58694/1 "2025-04-08T10:51:44Z")

</div>

**Is your feature request related to a problem? Please describe.**  
When creating image occlusion masks for image occlusion cards (not enhanced cards), the masks seem to appear slightly blurry and jagged around the edges. There is also very poor contrast between the mask edge and the background in dark mode . I am using Ubuntu 22.04 and have installed it as recommended in the manual. Below is a picture to show what I mean about the line’s poor quality:

 ![Screenshot from 2025-04-08 11-28-02](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/9/4/94f6f625a6b0bea11e45d12047a248e991bfa519.png)

The screenshot has been taken during a review of cards in light mode. This is also visible in the browser. In dark mode, there also is very little contrast between the border and the background:

 ![Screenshot from 2025-04-08 11-23-40](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/6/c/6cef63097b09a805981aa344c8d8674e7357095b.png)

**Describe the solution you’d like**  
I would like it so that the edge is not jagged and blurry. It should be a smooth solid line, like what would be possible if the masks were SVGs. In dark mode, the mask colour should slightly lighten so that there is contrast between the background and the mask (an example colour could be the one of the text on the screen which is `#808080` or a much lighter grey/white could be chosen as a default)

**Describe alternatives you’ve considered**  
I think but I am not sure that anki is not using SVGs for this internally from this [pull request](https://github.com/krmanik/anki/pull/1#issuecomment-1235638115). If that is the case, such a element which is both smooth and can change colour will be harder. With an SVG, you can use currentColor or even:

```svg
@media (prefers-color-scheme:dark) {
  :root {
<!--dark mode only set of colours can go here-->
  }
}

```

These methods may differ in their ability to work if the svgs are not inlined but are in an `<img>` tag.

---

<div class="post-metadata">

**Author:** ![WobbleTread](https://avatars.discourse-cdn.com/v4/letter/w/e9a140/32.png) [@WobbleTread](https://forums.ankiweb.net/u/WobbleTread)\
**Post date:** [April 10, 2025, 5:37pm UTC](https://forums.ankiweb.net/t/image-occlusion-masks-are-slightly-blurry-and-have-low-border-contrast-in-dark-mode/58694/2 "2025-04-10T17:37:00Z")

</div>

I spend some time and I’ve been able to consistently reproduce this.

1. Create an image occlusion card  

2. Open the deck to start reviewing the card.  

3. Resize the window from full screen, any size smaller than the original will work but making it as small as possible maximises the effect  

4. Click show answer, your answer (again, hard, good, easy) and then make it full screen  

And now image occlusion masks are very blurry. It is almost as if they were resized and turned into a picture at the small size and then just scaled up without any resolution increase. A similiar effect happens in the card preview windows.

I also wanted to ask, is this the right place to report bugs or the github in the issues section?

---

<div class="post-metadata">

**Author:** ![Anon\_0000](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@Anon\_0000](https://forums.ankiweb.net/u/Anon_0000)\
**Post date:** [April 10, 2025, 6:15pm UTC](https://forums.ankiweb.net/t/image-occlusion-masks-are-slightly-blurry-and-have-low-border-contrast-in-dark-mode/58694/3 "2025-04-10T18:15:45Z")

</div>

Can reproduce. For reference, the following is the code which needs to be changed in the card templates to make the borders thicker:

```auto
--inactive-shape-border: 10px #212121;
--active-shape-border: 10px #212121;

```

> [@WobbleTread](#):
>
> I also wanted to ask, is this the right place to report bugs or the github in the issues section?

This forum is the right place, although github is accepted too, as far as I know.

---

<div class="post-metadata">

**Author:** ![Danika\_Dakika](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/danika_dakika/32/17815_2.png) [@Danika\_Dakika](https://forums.ankiweb.net/u/Danika_Dakika)\
**Post date:** [April 10, 2025, 6:26pm UTC](https://forums.ankiweb.net/t/image-occlusion-masks-are-slightly-blurry-and-have-low-border-contrast-in-dark-mode/58694/4 "2025-04-10T18:26:55Z")

</div>

> [@WobbleTread](#):
>
> I also wanted to ask, is this the right place to report bugs or the github in the issues section?

Yes, the this is the right place. Not all issues are bugs, so we can triage them here, and keep Github reserved for developers.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/d/3/d3cdec828f6f8ecc123e2d1d135d4c4e4aaccf8d.png)
