Yes, this works.
Dimension Door and (Greater) Teleport work a bit differently, but there is nothing preventing their use to travel around Prismatic Wall or Sphere.
Dimension Door says:
You always arrive at exactly the spot desired – whether by simply visualizing the area or by stating direction.
(Greater) Teleport says:
This spell instantly transports you to a designated destination, which may be as distant as 100 miles per caster level.1
Neither of these spells would require you to interact with the Prismatic obstruction in any way.
1 (Greater) Teleport actually says: "This spell functions like teleport, except that there is no range limit".
My reasoning when writing https://rpg.stackexchange.com/a/176662/21179 was that dimension door is a form of planar travel. Prismatic wall says many things but it does not say that it extends into other planes or blocks planar travel.
This admittedly-unofficial reddit link: https://amp.reddit.com/r/Pathfinder_RPG/comments/7cf9o4/can_you_dimension_door_or_teleport_through_a/ agrees with the above, and also adds:
The effect of teleport, dimension door et al. happens at the caster, not the destination. To identify what a spell "goes through", you need to know where the line of effect is being drawn.
and teleportation effects have "target:you" so they don't send line of effect through the wall.
No. This does not work.
One cannot use a spell to pass through the Indigo nor Violet colours.
Prismatic Sphere says (emphasis added)
When you’re inside it, however, the sphere blocks any attempt to project something through the sphere (including spells). Other creatures that attempt to attack you or pass through suffer the effects of each color, one at a time.
Here, "pass through" makes no distinction between walking through, flying through, or using a form of planar travel to pass through.
What specifically blocks instantaneous travel provided by spells? Both the Indigo color and Violet color in the wall, as identified in Prismatic Wall:
Order| Color | Effect of Color | Negated by -----+--------+--------------------------------------------------+---------- 6th | Indigo | Stops all spells | Daylight | | Will save or become insane (as insanity spell). | 7th | Violet | Energy field destroys _all objects and effects_.*| Dispel magic | | Creatures sent to another plane (Will negates). | or Greater Dispel Magic
When a spellcaster tries to use Dimension Door or Teleport to enter a fresh Prismatic Sphere containing all colours, he or she will hit the Indigo color. This stops all spells. Dimension Door is a spell. So is Teleport. Stopped. The only exception, the only spell not blocked by the Indigo color, is the spell Daylight.
Even after the Indigo color is taken down, there is the Violet color. The spellcaster has a chance to save or is sent to another plane. When I have run high level campaigns, "all objects and effects" includes Dimension Door and Teleport effects. The "Creatures sent to another plane" effect is enough for this GM to make a case that the wizards who created Prismatic Sphere thought to block planar travel and instantaneous travel.
Having said all this, one of the best sessions my table had was when one of my players said, "My 18th level Monk is walking through all the colours of that Prismatic Sphere!", made all his saves, took the half damage where stated, then proceeded to introduce the caster to a Flurry of Blows.