Model.morphdomainautocolor#

Model.morphdomainautocolor(collection)#

Sets the color of selected domains to be a different value if possible. All 64 colors will be used, except for black, before the same color is used a second time.

Parameters:

collection (Collection) – The collection containing the domain entities to set the color.

Example#

Assign a different color to a number of domains#
import hm
import hm.entities as ent

model = hm.Model()

model.morphdomainautocolor(
    collection=hm.Collection(
        model, ent.Domain, [6, 15, 154, 153, 68, 143, 211, 208, 185, 184, 167, 157]
    )
)