Every driver knows texting and driving can be dangerous, but Colorado just made it legal — as long as the driver is careful.

It’s worth noting the law also increases penalties for texting while driving from $50 to $300 and reduces the number of points on one's driver's license to one from four for the “misuse” of cell phones while driving.

Read: Do Not Disturb While Driving On iPhone, iOS 11 Revealed By Apple At WWDC

However, the law states citations will not be issued unless texting caused the driver to operate the car in a “careless and imprudent manner.”

The law states:

“An operator of a motor vehicle shall not be cited for a violation of subsection (3) of this section unless a law enforcement officer saw the operator use a wireless telephone for the purpose of engaging in text messaging or other similar forms of manual data entry or transmission, in a manner that caused the operator to drive in careless and imprudent manner, without due regard for the width, grade, curves, coroners, traffic, and use of the streets and highways and all other attendant circumstances as prohibited by Section 42-4-1402.”

The law still forbids those 18 years and younger from using a cell phone while driving.

Colorado’s law comes at a time when other states are imposing stricter driving and texting regulations. As of June 2017, text messaging is prohibited for all drivers in 47 states and the District of Columbia. Iowa and Washington this year put in place two of the toughest laws to curb distracted drivers. Washington and Arkansas expanded the definition of distracted driving by including other phone activities, like using Facebook, Instagram, YouTube and Netflix.

In 2015, more than 230,000 drivers were involved in car accidents in Colorado, a 2017 report from the Colorado Department of Transportation showed. Distracted driving was to blame for 16 percent of injury and fatal crashes, and 26 percent of noninjury incidents. The CDOT report said there was a 14 percent increase in distracted drivers over time after comparing the years 2010-12 to 2013-15.

Read: Tim Cook, Self-Driving Cars: CEO Says Apple Focusing On Project Titan

Meanwhile, the private sector is stepping up to curb distracted driving. Apple revealed at its Worldwide Developers Conference the new Do Not Disturb While Driving feature, which will come with the iOS 11 update for iPhones and iPads.

Using speed detection, the feature will automatically sense when you’re driving and turn off notifications. It also includes an auto-reply function, so those messaging you know you’re driving.

The feature comes after Apple was hit with lawsuits over car accidents caused by distracted drivers. The lawsuits claim Apple has had the technology to lock out drivers while driving since 2008 but chosen not to use it.

“We think this is going to be a real important step for safety in the car,” Craig Federighi, Apple's senior vice president of software engineering, said as he introduced the feature.