A ceiling rose in a junction-box system will have the live (red) conductor connected to one of the outer terminal blocks, the neutral (black) to the other, and the earth conductor to the earth terminal. The flex conductors of the lamp are wired to match: brown (live) to the live terminal block holding the red conductor and blue (neutral) to the neutral block holding the black conductor. If the flex is three-core (with an earth conductor in green/ yellow), this is connected to the earth terminal along with the cable earth.