Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] setColor renders vehicles invisible

Nevermind, the range for RGB is from 0-255, so I had to increase that pixel intensity. 
action_colors = { 0 : (0,0,255,1), 1 : (0,255,0,1), 2 : (255,0,0,1) }

Thank you.

Sincerely,
Hriday


On Wed, 19 Oct 2022 at 11:38, Hriday Sanghvi <sanghvih@xxxxxx> wrote:
Yes sorry, I actually did.

My color dictionary for right, stay, and left in order looks like this:
action_colors = { 0 : (0,0,1,1), 1 : (0,1,0,1), 2 : (1,0,0,1) } # right (blue), stay (green), left (red)

Thank you.

Sincerely,
Hriday


On Wed, 19 Oct 2022 at 11:34, Angelo Banse <angelobanse@xxxxxxxxx> wrote:
Hello Hriday,
You should set the Alpha (transparency) to 1. So if you want red, use (1,0,0,1).

Best regards,
Angelo


Hriday Sanghvi via sumo-user <sumo-user@xxxxxxxxxxx> schrieb am Mi. 19. Okt. 2022 um 12:28:
Hello,

I am using
traci.vehicle.setColor("veh1", (1,0,0,0)) # red
to change a vehicle's color depending on where it changes lanes to, but the vehicles become invisible after first being inserted. Here is an example where you can spot the cars from their indicators instead:

invisible cars.png

Thank you. Please advise.

Sincerely,
Hriday
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
--

Back to the top