That will work. Maybe a 2x2, with each one having 1 of the 4 colours, that gives you a lot more combinations, but effectively it halves the screen resolution as your 'pixels' are now 2x2.
To work out which colour is the closest to another, you can use Pythagoras on the rgb values. ie.
distance_between_colours = (r1-r2)^2 + (g1-g2)^2 + (b1-b2)^2
(no need to do the square root)
pick the shortest distance.
A better visual result comes from converting both colours from RGB to HSV and doing Pythagoras on those values.
Jim