how to change logo.svg color if is mobile device?

Tracking Faso7 months ago

I notice that traccar default logo change the text color to white when its desktop version and to text color black when it is a mobile version.

how can do same with my logo.svg to change color according to device screen size?

Anton Tananaev7 months ago

You can use "current color" for it.

Tracking Faso7 months ago

I just used "current color" it by modifying the svg with a text editor. My logo which was initially white became black on a pc or mobile device. I want it to become white on PC and black when it's a mobile phone

Anton Tananaev7 months ago
Tracking Faso7 months ago

Hello @Anton

I followed your advice but it still doesn't work. I'm sending you screenshots of the steps so you can see.
firstly I modified the logo.svg with my editor and here is the screenshot

text editor

and finally I used I uploaded the image to the server here is the screenshot

logo upload

the color becomes black whether it is on PC or a mobile device

Help me please because I spent a whole day to solve without finding the solution

Anton Tananaev7 months ago

I checked the code and it looks like currentColor is not supported for custom images. But we have logoInverted option that you can use.

Tracking Faso7 months ago

if I understand correctly what you are saying I must replace currentColor with logoInverted in my style code of my svg

Anton Tananaev7 months ago

No, logoInverted is another attribute in settings.

Tracking Faso7 months ago

@Anton Tananaev

it works well, thank you for you precious help. I like traccar