Posted 21 May 2026, 3:30 am EST
Hi Moshe,
Thank you for your patience while we discussed this matter with the concerned development team.
As per their inputs, the default color for the pencil/brush can be set after loading the image using the following code:
viewer.showSecondToolbar("paint-tools").then(() => {
paintToolsPlugin.paintDesignerContext.setState({
penColor: "#ff0000",
brushColor: "#ff0000"
});
});
Regarding the default border/fill colors for the object tools, modifying these default values is currently not supported. However, this enhancement has already been implemented and will be available in DsImageViewer v9.1.1, which is scheduled for release on May 31, 2026.
Please also refer to the attached code sample, which demonstrates how to use the above snippet to set the default pen/brush color in the paint tools.
Please let us know if you require any further assistance.
Kind Regards,
Chirag
Attachment: PaintTools.zip