How To Change Color of Icon on UI Toolkit Button

i have a button with icon but i cant find a way to change the icons color and it remains white always

i have tried the followings but it doesnt work

.unity-button--with-icon > .unity-button__image {
    -unity-image-tint-color: rgb(255,0,0);
    -unity-background-image-tint-color: rgb(255,0,0);
}
.unity-button > .unity-button__image {
    -unity-image-tint-color: rgb(255,0,0);
    -unity-background-image-tint-color: rgb(255,0,0);
}
.unity-button__image {
    -unity-image-tint-color: rgb(255,0,0);
    -unity-background-image-tint-color: rgb(255,0,0);
}
1 Like

Same here. I even tried to use the background-image and image-tint instead of setting an icon. Doesn’t work either.

I was having same issue.

The solution is extra - on --unity-image-tint-color because for whatever reason unity-image uses two leading - while unity-background-image uses one