Want to set the color of annotation tool state

Hi Everyone,

I hope you are doing great.

I’m using cornerstone3d with Reactjs. I just stuck a little while setting the color of annotation states.

I’m adding some ProbeTool points dynamically on the page load from API. I want to change/set the color of these points. I have gone through the docs but didn’t find a solution.

let element = cornerstoneElementRef.current;
const newAnnotation = {
            annotationUID: "feba8487-e8dd7-49c2-9b98-c3c5a3965cae",
            data: {
                label: '',
                handles: {points: [[-45.13929852498457, -146.38819012692312, 78.00000000000006]]},
                cachedStats: {},
            },
            highlighted: true,
            invalidated: true,
            isLocked: false,
            isVisible: true,
            metadata: {
                FrameOfReferenceUID: "1.3.6.1.4.1.14519.5.2.1.7009.2403.490913010608778852675014095313",
                referencedImageId: imageIds[0],
                toolName: "Probe",
                viewPlaneNormal: [0, 0, -1],
                viewUp: [0, -1, 0]
            }
        }
        cornerstoneTools.annotation.state.addAnnotation(newAnnotation, element);
        const renderingEngine = getRenderingEngine(renderingEngineId);
        const viewport = renderingEngine.getViewport(viewportId);
         viewport.render();

How can I set the color of a new annotation which is added dynamically?
Thank you, looking forward to you guys.

The colors are through cornerstone toolStyle Config | Cornerstone.js