California is set to become the first US state to ban discrimination against natural hair.
The new bill, which the Senate passed in April, amends anti-discrimination laws to include "traits historically associated with race" and "blackness".
It bars discrimination against black hairstyles in schools and workplaces.
California's assembly voted unanimously in favour of the measure on Thursday, sending it to Governor Gavin Newsom's desk for signing into law.
The update to the law comes after years of nationwide reports of black students being sent home from school over braids or natural styles that violated dress code rules.
In the workplace, black employees have often reported unfair policies that describe natural hair as unhygienic and unprofessional. The US military had a ban on dreadlocks for women until 2017.
"Professionalism was, and still is, closely linked to European features and mannerisms, which entails that those who do not naturally fall into Eurocentric norms must alter their appearances, sometimes drastically and permanently, in order to be deemed professional," the California bill states.
"Hair remains a rampant source of racial discrimination with serious economic and health consequences, especially for black individuals."
The bill has been referred to as the Crown (Create a Respectful and Open Workplace for Natural Hair) Act and was sponsored by Democratic Senator Holly Mitchell, who is black.
It passed 69-0 and notes that while afros are protected federally by the Civil Rights Act of 1964, black individuals are unfairly affected - deterred, burdened or punished - by dress code policies targeting "braids, twists and locks".
New York City enacted a similar anti-discrimination policy in February. The city's Human Rights Law now protects "natural hair or hairstyles that are closely associated with their racial, ethnic or cultural identities".
Black hair has been controlled and policed for centuries - during the 1700s in Louisiana, women of colour, whether they were enslaved or not, were ordered to cover their hair with scarves.
For decades in the US, black women have used sometimes dangerous or damaging chemical methods to straighten their natural hair. These harsh treatments could permanently damage hair, cause it to fall out, or burn the scalp.
California's measure, which is expected to be signed into law by the governor, has been praised on social media.
But some supporters have also pointed out that no other hair texture has needed legislation to prevent discrimination.