I’m a css/html/js all that domain – beginner. so i am learning to code an app
I added a white png to a code:
<div class="todo-app">
<h2>To-Do list <img src="images/clock.png" alt=""></h2>
<div class="row">
<input type="text" id="input-box" placeholder="Add your text">
<button>Add</button>
</div>
.todo-app h2 img {
width:150px;
margin-left: 10px;
}
then i got the idea to change to turn the original white into another color, directly in the code (to fit my app theme)
how can i do this ?
i tried to use the filters
with for example :
filter: saturate();
or
background:
/*or */
color:
i admit that i am not used to those tools yet
2
Answers
Filter is the right CSS property to use in this case, there are a lot more to it than just saturate. This link should help. https://css-tricks.com/almanac/properties/f/filter/
In this example, sepia(100%) converts the white areas of the image to a sepia tone, which can then be further adjusted using hue-rotate and saturate to achieve the desired color effect. You can experiment with different values for hue-rotate and saturate to get the color you want.