I've created a style in ArcGIS Pro that defines the color of features based on an attribute value, where the color is specified using a hex code. When I publish this layer to ArcGIS Online, the color setting is lost. Is it possible to create a similar style in ArcGIS Online where the color is determined by the hex code in the attribute value, so that the color is preserved when published?
Do you only experience this issue when creating and using a style you've created in ArcGIS Pro? I ask this as if you just set the symbology for a layer in the symbology pane in ArcGIS Pro, the colour that you set using a hex code should carry over to ArcGIS Online.
Maybe you could provide some more info on how you've set up the style and I'll give this a test?
Thanks,
Issy
Does the color show in map viewer classic or new map viewer or neither?
This is supported in Map Viewer and other 4.x based apps like Instant Apps and Dashboards. You will want to make sure you apply this using arcade when defining it in Pro. This will not work in Map Viewer Classic or Web AppBuilder and you will need to make sure "Make symbols compatible for all apps" is unchecked in the sharing panel in Pro.
Here is a sample map using an attribute to drive the color of a feature
https://jsapi.maps.arcgis.com/apps/mapviewer/index.html?webmap=bcda0069313e43e8a63800c250b8bd84