When she was 16, Cheri Huber considered her skin splotchy and pasty. She began going to a tanning salon about three times a week.

“There were tanning businesses everywhere,” said Ms. Huber, now 41 and living in Kingwood, a Houston suburb. “I said, ‘This must be cool to do because everybody’s doing it.’ ”

Ms. Huber continued her tanning regimen for more than a decade, eventually buying a tanning bed. In 2008, she was treated for melanoma and has been in recovery for almost five years.

“I wish I was a little more educated,” Ms. Huber said about her tanning routine.

Soon, Texas will join a number of states that bar minors from tanning indoors, which experts say greatly increases the risk of melanoma in those under 18. Senate Bill 329, written by State Senators Joan Huffman, Republican of Southside Place, and Sylvia R. Garcia, Democrat of Houston, automatically became law in June without the governor’s signature and will take effect on Sunday.