Some help with annotation colors and data-elemet and headers

Whenever a user annotate on pdf I want to trigger a event which set its color to some value using FillColor and StrokeColor or any api you provide/I want to set color manually for all annotation to particular value(any annotation user made should be set to that value)
I had read documentation of Create custom annotation styles but unable to get the result,please help me with it.
And when we disable element using


the beolw header is still availabe,like in below image

i had disable annotate and shape but below that is still visible,kindly pin the api for closing that also.(as annotate tab is closed)
an api for closing below mentioned marked element.(i want it close because color of annotation will be set by me))

Thanku u in advance

Hi there,

Thank you for contacting pdf.js express forums,

We have an anntoationChanged event where you can set your customization on an ‘add’ action:

To disable the Annotate and Shape tool group, please follow the guide here:

You would be calling:

instance.UI.disableElements(['toolbarGroup-Shapes', 'toolbarGroup-Annotate']);

Best regards,
Kevin Kim