Answer the question
In order to leave comments, you need to log in
How to replace color in an image using js or php?
Hello. There are images of carpets on which it is necessary to replace the colors using js or php, but in such a way that the texture is preserved. OpenCV does not see the edge of the image in either hsv or rgb as the colors are very similar.
or I'm doing something wrong, but when choosing orange, yellow also gets into the sample. Just like gray goes with dark gray. There are 5 colors in the photo.
Tell me how with the help of which js library this can be implemented.
I am attaching an example for clarity:
Answer the question
In order to leave comments, you need to log in
Hello, try with css and hue-rotate:
elem.style.filter='hue-rotate(45deg)'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question