isi-vista / adam

Abduction to Demonstrate an Articulate Machine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

If object has a color property, display a swatch of that color in the properties list

lichtefeld opened this issue · comments

Currently features for ADAM's discovered concepts are detailed in a 'simple' list. It would be ideal for this display to include a small span of ~40-50px long after the line which is a hex code. This span should be colored in the color indicated by the hex. This will allow for a better human understanding of the color attribute.

Screen Shot 2022-01-10 at 9 35 11 AM

To accomplish this, the method of generating the feature list will need to be updated to allow for some inspection of the string type to identify the color feature. A simple match would be to check for the # sign at the start of the feature as this is probably the only color feature we'd be including however a more robust match would be to regex match # + 6 hex digits as the only text in the line.