# Colour paint mixer

Hi guys, im just wondering i got a simple score system for my Virtual reality paint mixer

The objective of this game is for the users to mix colours together and create new ones and earning points in the process. i’m just wondering how i can make this in a point system i am really confused on how to do it.

thanks jack

I’m sorry, but this question does not have a definable answer, it depends more on personal preferences and will result in a discussion. So it would be better suited to ask it on the Unity Forum.

That said, you could assign a point value by absolute color difference, either subtracting each color component from each other, taking the absolute value and summing it (see example below), or even better, converting to HSV color space and doing the same there, but weighting the components differently (H contributes most to color difference, so multiply by 5, V the least, so leave it at x1).

RGB version:

``````Color1 #404080, Color2 #FF0080 => abs(64 - 255) + abs(64 - 0) + abs(128 - 128) = 191 + 64 + 0 =  255 points
``````

Maximum points in this system between #FFFFFF and #000000 is 765, but for example the points for blue and red are only 510, even though they are vastly different colors.

HSV version:

``````Color1 #404080, Color2 #FF0080, which is HSV(240, 128, 132), HSV(330, 255, 255) => 5 * abs(240 - 330) + 3 * abs(128 - 255) + abs(132 - 255) = 5 * 90 + 3 * 127 + 123 = 954 points
``````