There are 4 levels to the lighthouse, each having a color-coordinated dial to it. From the top to bottom, the colors are yellow, orange, blue, then purple at the bottom.
This is the algorithm to make sure the dials read 2746 from top to bottom:
1. Press PURPLE until PURPLE is at the correct number (6)
2. Press ORANGE until BLUE is at the correct number. (4)
3. Press YELLOW until ORANGE is at the correct number. (7)
4. You should now have the bottom 3 numbers at the correct numbers.
5. Press YELLOW until YELLOW is at the correct number (2). You HAVE to count the amount of times you turned the YELLOW dial.
6. Press PURPLE the same number of times you pressed YELLOW in step 5.
7. Press BLUE until it is back at the correct number.