Just behind the vanities is a giant window that transforms from opaque to transparent at the flip of a switch, revealing ocean views.

LOCATED ACROSS THE STREET FROM THE OCEAN in Swampscott, this contemporary-style house has a master bathroom with killer views — some of the best in the house, in fact. That was not the case, though, before a recent renovation by Jerusha Hall, an architect with Walter Jacob Architects in Marblehead: “There was just one very small window with a tub in front of it,” she says of the old bathroom. The homeowners hired Hall’s firm to transform the compact, outdated space into an oasis of calm that feels more expansive and capitalizes on the coastal vista.

Because bathrooms need to ensure privacy, Hall replaced the room’s tiny window with a much larger one made of Smart Glass. The new 8-by-10-foot window, composed of liquid crystal sandwiched between two panes of glass, transforms from clear to opaque at the flip of a switch. Fabricated by Pittsfield-based LTI Group, the roughly 700-pound window is an inch-and-a-quarter thick and had to be hoisted up to the second-story bathroom by crane. “It was pretty impressive to watch,” says Hall, noting that the expanse of glass was the largest LTI had ever made.

With its excellent vista, the window makes the room feel larger, as does the mostly white color scheme. The floor and walls are sheathed in white unglazed porcelain tile. To enliven the monochromatic palette, and as a departure from the dark blues prominent throughout the rest of the house, the homeowners selected glass tiles in aqua tones — which have a Miami flair, says Hall — as an accent.

Custom vanities of exotic zebrawood give the room that wow factor. “We wanted the vanities to pop,” says Hall, noting that because the sculptural oval Duravit sinks are funky and unusual, it was important that the pedestals on which they were to sit be equally distinct. Mirrors above the sink are mounted on cabinets made of unsteamed beech, paler than the more commonly used kind.

In another move to create a feeling of space, Hall eliminated the tub in favor of a walk-in shower outfitted with a built-in bench. From that perch, it’s possible to peer out of the bathroom window; the shower’s partial aqua-tiled wall prevents anyone outside from seeing in.

“We worked to put in elements that would help the homeowners feel protected, not exposed,” says Hall. “So they are able to relax and enjoy the view.”

HOW TO LIGHT A BATHROOM

Illuminating “working” bathrooms — versus powder rooms — is tricky, says Nancy Goldstein, principal of Marblehead-based Light Positive who developed the bathroom’s lighting plan. There should be lots of light, says Goldstein, but faces must be lighted in a flattering way. She advises the following:

> Use downlights sparingly and combine them with lighting from another angle. Here, task lighting is provided by small, square, recessed ceiling fixtures over the sinks, along with sleek inset lights flush with the mirrors.

> Choose light fixtures that are unobtrusive. Goldstein selected recessed lights that are flush with the ceiling. “You don’t want the eye to be drawn to the ceiling,” she says. “You want to be looking at the unusual sinks, the tile, the exotic-wood vanities.”

> Provide a layer of general light that is soft and shadowless. In the center of the room, a round surface-mount light fixture with a white-glass diffuser ensures that the room is properly illuminated at night.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.