You should setup a Color option with 4 option values: red, green, blue, white and assign it to product.
Then when customer adding the product to the cart, then can choose an option value, enter the quantity and add to the cart. If they want to purchase 4 different color of product, they must choose and add it to the cart 4 items.