Line an 8×8-inch baking pan with parchment paper, leaving an overhang for easy removal.
Combine the white chocolate chips, sweetened condensed milk, butter, and salt in a saucepan over low heat, stirring until completely smooth.
Remove from the heat and stir in the vanilla extract and pistachio extract.
Fold in half of the chopped pistachios.
Transfer about one-third of the mixture to a separate bowl and stir in the melted dark chocolate.
Add the green food coloring to the remaining white mixture, if using, and mix until evenly colored.
Spread the green pistachio mixture into the prepared pan.
Spoon the chocolate mixture over the top in several dollops.
Use a butter knife or skewer to gently swirl the two mixtures together without overmixing.
Sprinkle the remaining chopped pistachios evenly over the surface and lightly press them into the fudge.
Refrigerate for at least 2 hours or until completely firm.
Lift the fudge from the pan using the parchment paper and cut into bite-sized squares before serving.