K-Nearest Neighbor (kNN) algorithm is one of the simplest and most flexible and effective classification algorithms,
which has been widely used in many fields. Using the multi-band samples extracted from large surveys
of SDSS DR7 and UKIDSS DR3, we investigate the performance of kNN with different combinations of colors to
select quasar candidates. The color histograms of quasars and stars is helpful to select the optimal input pattern
for the classifier of kNN. The best input pattern is (u-g, g-r, r-i, i-z, z-Y, Y-J, J-H, H-K, Y-K, g-z).
In our case, the performance of kNN is assessed by different performance metrics, which indicate kNN has rather
high performance for discriminating quasars from stars. As a result, kNN is an applicable and effective method
to select quasar candidates for large sky survey projects.