The transition between day and night is called “twilight”. Just before sunset it starts with the golden hour and moves from the blue hour towards the night. During sunrise, night turns to day in the phases astronomical twilight, nautical twilight, and finished by civil twilight. The sunset is during the civil twilight.