another way to do this is to just create another histogram trace on top of your 1st trace, which specifies the color to highlight. For example:
fig = px.histogram(df, x="variable")
fig.add_trace(go.Scatter(df[df["variable"]=="attribute"]["variable"], marker={"color": "red"})
or something similar will give you this result: