Choose where you want the straight line to be on the wall. Paint a coat of the wall's base coat over the area you plan for the straight line. Overlap the spot planned for the straight line. Let dry.
Measure the distance between where you want your straight line and the ceiling at one end of the room and make a mark. Repeat at the other end of the room.
Use a straight edge, laser leveler or chalk snap line to create a straight line the full length of the area to be painted. Measure the distance between the line and the ceiling at several intervals along the wall to ensure that the line is straight. Repeat the process until you have a straight line.
Tape over your straight line with painter's tape. Go over the tape a few times to ensure that there are no bubbles or gaps where paint can drip through.
Paint the taped-off area with the accent color. Paint over the edge of the tape to create the straight line. Let it dry completely.
Carefully remove the tape to reveal the straight line. Gently remove any drips with a putty knife. Touch up the area with the base color.