You can create a virtual attribute in 'Article' and define in a custom action a number value for each colors. This is an easy method to get a clear combined number string for articles which contain more than one colour.
For the generation of a unique color number, maybe you can use the getGuid() method of the Colour proxy object. If this number is too long, you can use the following method:
colour.getMendixObject().getId().getObjectStoreId()
This number is the internal database id for the object. This is a low number and unique within all Colour objects.