RGB LED strip inverted PWM
The RGB LED strip has a common anode (V+). When you put 12 V on R, G or B, the LEDs have 12 V on both sides, so there is no voltage across it and no current.

And if you put 0 V, they have 12 V across it and light up.

To fix it, just invert the PWM value in your code:

analogWrite(255-pinR, R);
analogWrite(255-pinG, G);
analogWrite(255-pinB, B);