To control the brightness of an LED with a POT read the pot position using the ADC, convert the range of values from 0 - 1024 to 0 - 255 then write that to the PWM controlling the LED.
This segment of code came from this discussion:
knobvalue = analogRead(potpin);
knobvalue = map(knobvalue, 0, 1023, 0, 255);
This is just for 1 LED. If you have 3 LEDs connected to 3 Arduino PWM pins, you will have to write the same value to all 3 pins.
If this is 1 RGB LED and you are controlling each of the 3 LEDs with 3 Arduino PWM pins, this will (for most RGB LEDs) cause the RGB LED to always appear White as you are varying all colors by the same amount.
If you are trying to vary the brightness of an RGB LED that is set to an arbitrary color... this is more difficult:
Using 3 variables ranging from 0 to 255 pick your color. Before writing these to the 3 PWMs which control the RGB LED, multiply each by the value read from the ADC connected to the POT. Now divide each by the maximum possible ADC value. Take care you do not exceed the range of your variables! Write these new values to the 3 PWMs which control the RGB LEDs.