Adding colors by State/Province

For my project I need to be able to color specific areas, such as individual states/provinces (not routes or traffic) either red. green, or yellow. Is it possible to this? If so, how??

Please look at the example here: Map examples | Maps SDK Web JS v6
pick from the menu: Map layers / GeoJSON polygon with solid fill

Many geographic geometries can be retrieved with Search API.