further updates to reduce dependency on innerhtml and consolidation of code
share colors should be true by default