California would need the support of voters, 2/3 of Congress and 38 states to leave the U.S.

Shortly after it became clear Donald Trump was going to win the presidential election Tuesday night, the hashtag #Calexit started trending locally on Twitter.

Calexit, of course, is a play on Brexit and suggests California should exit the United States as Great Britain left the European Union this summer. However the actual logistics of a state seceding are far more complicated than the portmanteau would suggest.

First things first. The U.S. Constitution contains rules for how a state may enter the union but doesn't have explicit instructions on how to leave. According to Article IV, "New States may be admitted by the Congress into this Union; but no new State shall be formed or erected within the Jurisdiction of any other State; nor any State be formed by the Junction of two or more States, or Parts of States, without the Consent of the Legislatures of the States concerned as well as of the Congress."

It actually hasn't been that long since a state has tried to leave. In fact, it was just a few days after President Barack Obama was elected to his second term. In 2012, a Texas-based online petition asked the White House to set the Lone Star state free but, unsurprisingly, it was rejected.

"Our founding fathers established the Constitution of the United States 'in order to form a more perfect union' through the hard and frustrating but necessary work of self-government," wrote public engagement director Jon Carson at the time. "They enshrined in that document the right to change our national government through the power of the ballot — a right that generations of Americans have fought to secure for all. But they did not provide a right to walk away from it."

It has been more than a hundred years since the Supreme Court considered the issue in 1868's Texas v. White. There the high court held that the U.S. is "an indestructible union."

That doesn't mean Californians aren't pursuing the idea, though. One group called YesCalifornia is convinced that the lack of specificity in the Constitution combined with the language in Texas v. White opens the door for California to leave. Quoting the Supreme Court, the site states: "When Texas became one of the United States, she entered into an indissoluble relation. The union between Texas and the other States was as complete, as perpetual, and as indissoluble as the union between the original States. There was no place for reconsideration or revocation, except through revolution or through consent of the States."

The highlighted portion is important, according to the site, because it highlights that California cannot leave the U.S. without the help of other states.

YesCalifornia is pushing for a 2018 ballot measure that would call for a special election in which Californians would vote for or against splitting from the U.S. The site lays out nine key arguments for leaving, ranging from taxes to immigration to natural resources, and claims the state's economy is more comparable to that of other nations than other states.

If voters were to support a Calexit, then a California lawmaker would have to propose a constitutional amendment. Under Article V, changing the Constitution requires a two-thirds vote from the U.S. House of Representatives and Senate.

"If the Amendment passed it would be sent to the 50 state legislatures to be considered (to satisfy the "consent of the states" requirement in Texas v. White)," writes Louis Marinelli on the site. "It would need to be accepted by at least 38 of the 50 state legislatures to be adopted."

Alternatively, YesCalifornia says that California could call for a convention of the states and two-thirds of those delegates would have to approve the amendment. Then 38 of the 50 state legislatures would have to approve it.

It's a long shot, but not impossible. Silicon Valley venture capitalist Shervin Pishevar even offered to fund the endeavor Tuesday night on Twitter, although he couldn't be reached for further comment.