Same situation with fog. If there is fog that brings visibility below CAT1 minima you will need a takeoff alternate within 1 hour flight time in an engine-out situation. Same goes for the takeoff at sunset. You will need an alternate with night facilities within 1hr flight time of your departure airport.
So if you have this suitable takeoff alternate, I would say you are allowed to take off until sunset.