I'm trying to figure out how to implement djiktra algorithm to find the shortest path between 2 unweighted graphs. The suggestion I got was to use 2 graphs one for the red color and one for the blue color.The cost is always 1 to travel but to access a red square while being blue you need to pay 2 to switch graph.
I'm mostly looking for suggestions and references has anyone done something similar ???

Create a new weighted graph based on the original graph where a blue -> red path costs 3 instead of 1, then run Dijkstra on that.
Edit: it's probably not necessary to actually create the new graph, you can get the weights directly from the original graph, but creating the new graph first is probably easier to follow at first.
The top corner would look like this: