# Dynamically changing the colours of parts of a raster image (not SVG) using HTML/CSS or something else?

**URL:** <https://forum.kirupa.com/t/dynamically-changing-the-colours-of-parts-of-a-raster-image-not-svg-using-html-css-or-something-else/677930>\
**Category:** web dev\
**Created:** [November 10, 2025, 2:51pm UTC](https://forum.kirupa.com/t/dynamically-changing-the-colours-of-parts-of-a-raster-image-not-svg-using-html-css-or-something-else/677930 "2025-11-10T14:51:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TEMPEST\_114](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tempest_114/32/30418_2.png) [@TEMPEST\_114](https://forum.kirupa.com/u/TEMPEST_114)\
**Post date:** [November 10, 2025, 2:51pm UTC](https://forum.kirupa.com/t/dynamically-changing-the-colours-of-parts-of-a-raster-image-not-svg-using-html-css-or-something-else/677930/1 "2025-11-10T14:51:14Z")

</div>

Hi. I’ve just found and watched your tutorial on changing the colours of an SVG image using HTML and CSS.

I have a question. Let’s take an image (raster I believe it’s called) like the image below.

If I wanted to change the colours of parts of this image - say for example the colour of the ears and tail, a) without losing any of the shading/detail - so not just a single colour blotting out the area of the ears and tail, but using the existing image shading and detail, is this possible using HTML and CSS?

If it’s not, do you have any other ideas how to do this?

Thank you.

 ![image](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/c/5/c546588d8534286de970c0ba725d1fe8d2b9c3d5.jpeg)

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [November 13, 2025, 5:07am UTC](https://forum.kirupa.com/t/dynamically-changing-the-colours-of-parts-of-a-raster-image-not-svg-using-html-css-or-something-else/677930/3 "2025-11-13T05:07:25Z")

</div>

No, there isn’t any way to do that using just HTML and CSS. This is the kind of change that will require a lot of image manipulation that isn’t easy to pull off.

One slow and expensive approach is to pass that on to an AI assistant in have it return the manipulated image 😅

---

<div class="post-metadata">

**Author:** ![TEMPEST\_114](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tempest_114/32/30418_2.png) [@TEMPEST\_114](https://forum.kirupa.com/u/TEMPEST_114)\
**Post date:** [November 14, 2025, 2:20am UTC](https://forum.kirupa.com/t/dynamically-changing-the-colours-of-parts-of-a-raster-image-not-svg-using-html-css-or-something-else/677930/4 "2025-11-14T02:20:39Z")

</div>

Do you have an example of such? And is that free?
