6. The range of the function $f(x)=\sqrt{x-3}+\sqrt{12-3 x}$ is ( ).
(A) $[1, \sqrt{2}]$
(B) $[1, \sqrt{3}]$
(C) $\left[1, \frac{3}{2}\right]$
(D) $[1,2]$
6.D.
The domain of $f(x)$ is $3 \leqslant x \leqslant 4$, so $0 \leqslant x-3 \leqslant 1$.
Let $x-3=\sin ^{2} \theta\left(0 \leqslant \theta \leqslant \frac{\pi}{2}\right)$, then
$$
\begin{array}{l}
f(x)=\sqrt{x-3}+\sqrt{3(4-x)} \\
=\sin \theta+\sqrt{3\left(1-\sin ^{2} \theta\right)}=\sin \theta+\sqrt{3} \cos \theta \\
=2 \sin \left(\theta+\frac{\pi}{3}\right) .
\end{array}
$$

Since $\frac{\pi}{3} \leqslant \theta+\frac{\pi}{3} \leqslant \frac{5 \pi}{6}$, then
$$
\frac{1}{2} \leqslant \sin \left(\theta+\frac{\pi}{3}\right) \leqslant 1,1 \leqslant 2 \sin \left(\theta+\frac{\pi}{3}\right) \leqslant 2 \text {. }
$$