The simplest way is to just realize it's 12 x 10 x 9 x 8 outcomes intuitively - there are 12 colors you could potentially use for the first room, then 11 colors for the second (because they're all different colored rooms you can't re-use the same color twice), 9 for the third, and a remaining 8 for the fourth.
In terms of formulas, you would use permutation, not combination [so 12!/8! not 12!/(4!8!)] because in this case order does matter - painting the first room blue and the second room red is a different outcome than painting the first room red and the second room blue, for example.