In Chicago, at least, that would be implicitly legal, unless the car actually hits you:
9-60-060 Pedestrian crossing. [...] (b) No pedestrian shall suddenly leave a curb or other place of safety and walk or run into the path of a vehicle which is so close that it is impossible for the driver to yield.
https://www.cityofchicago.org/city/en/depts/cdot/supp_info/o...