Talk to a lawyer, it is not legal.
It is legal and it isn't.
Federal law still classifies cannabis as a Schedule I narcotic. That category is for drugs like heroin that are said to be highly addictive with no medical value.
Even though polls show a record number of Americans believe marijuana should be legal, there’s been no move to change that at the Federal level. Currently 28 states permit medical marijuana and eight allow recreational use, including California.
Here's a good FAQ on recreational marijuana now being legal in California - from the kcra.com website...
Q: How much pot am I legally allowed to possess on my person?
A: 28.5 grams or about 1 ounce
Q: How old do I have to be to smoke recreational pot?
A: At least 21 years old.
Q: What other states have legalized recreational marijuana?
A: Alaska, Colorado, Oregon, Washington
Q: Am I allowed to grow my own marijuana?
A: Yes. You are allowed to grow up to 6 plants for personal use.
Q: Are there shops in the state now where I can buy recreational marijuana?
A: Not yet. You still need to have a medical marijuana card to make purchases at dispensaries. The state is figuring out the rules and regulations to sell recreational use marijuana, which will likely take most of 2017.
Q: Can I smoke weed in public?
A: No, you can only smoke in a private space.
Q: Am I allowed to smoke weed and drive?
A: "Whether it's marijuana, a prescription drug and unknown substance or alcohol, if any of those impair your driving, you're subject to DUI laws in California," California Highway Patrol Capt. Josh Ehlers said.