Short answer: Yes, but not for long.
While Gov. Jerry Brown did sign a law in September legalizing the strangely popular trend of posting ballot photos to social media, that law won't go into effect until Jan. 1, 2017. That means for this election it's still illegal to take and post a photo of your marked ballot.
According to an Associated Press survey, there are 18 states where so-called ballot selfies are illegal. (The AP put California in the "where legal status is unclear" category.) Some of these states take the illegality of such photos more seriously than others. Denver District Attorney Mitch Morrissey even issued a reminder to voters last week that posting such a photo would constitute a misdemeanor.
The warning said: "There is a state law prohibiting voters from showing their completed ballot to others. This would include posting your completed ballot on social media."
ACLU advocates noted, however, this warning implies that disabled voters who require assistance in filling out their ballots would be guilty of a misdemeanor -- which is not the case. It's also true that courts in Indiana and New Hampshire have overturned similar laws as a free speech issue. So expect the national fight over the ballot selfie to continue.
Why outlaw the practice in the first place anyway?
Originally, sharing photos of marked ballots (as opposed to unmarked ballots) was banned to stop the potential for vote-selling. The new California bill allowing ballot selfies got around this concern by simply adding the sentence: "A voter may voluntarily disclose how he or she voted if that voluntary act does not violate any other law."
This means that, while you will be able to take a photo of yourself and your ballot after Jan. 1, you still can't violate other laws, such as: no recording video or photos of other voters within 100 feet of a polling location, for fear of potential intimidation and interference -- though there are some potential exceptions to this, such as specific media requests. And definitely no vote selling.
However, ballot selfie enforcement is so unlikely that the bill's author, Assemblyman Marc Levine, D-San Rafael, already has been sharing constituents' photos on his own social media accounts -- despite their technical illegality through the end of the year.
If you're worried about falling on the wrong side of the law, you can either wait until Jan. 1 or you can go nuts taking as many photos of your unmarked or sealed mail-in ballots as you want.