How to Change the Color Stop of Gradient Overlay

Hi
I’m making a plug-in that adds gradient overlay of layer effects.
The part that sets the color of the colorstop of the gradient overlay is the most important, but this is the problem.
Running this code adds a 45-degree black-white gradient overlay effect, but the color of each stop point doesn’t change.
I want the foreground color to be the color of colorstop1 and the background color to be the colorstop2, can you see what the problem is?

document.getElementById('gradientFillButton').addEventListener('click', async function () {
    alert('clicked');
    const batchPlay = require("photoshop").action.batchPlay;
    const ExecuteAsModal = require("photoshop").core.executeAsModal;

    ExecuteAsModal(async () => {
        return batchPlay(
            [
                {
                    _obj: "set",
                    _target: [
                        { _property: "blendOptions", _ref: "property" },
                        { _enum: "ordinal", _ref: "layer", _value: "targetEnum" },
                    ],
                    to: {
                        _obj: "blendOptions",
                        gradientFillMulti: [
                            {
                                _obj: "gradientFill",
                                angle: {
                                    _unit: "angleUnit",
                                    _value: 45,
                                },
                                type: { _enum: "gradientType", _value: "linear" },
                                stops: [
                                    {
                                        color: {
                                            mode: "RGBColor",
                                            value: {
                                                "r": 102.0,
                                                "g": 238.0,
                                                "b": 207.0
                                            },
                                            "type": "process",
                                        },
                                        midpoint: 50,
                                        offset: 0,
                                    },
                                    {
                                        color: {
                                            mode: "RGBColor",
                                            value: {
                                                "r": 74.0,
                                                "g": 67.0,
                                                "b": 207.0
                                            },
                                            "type": "process",
                                        },
                                        midpoint: 50,
                                        offset: 1.0,
                                    }
                                ]

                            },
                        ],
                    },
                },
            ],
            { options: { dialogOptions: "display" } }
        );
    });
});

See if this is good for your purpose

document.getElementById("gradientFillButton").addEventListener("click", test1);


async function test1() {

  await GRADIENT();

async function GRADIENTFILL() {
    let result;
    let psAction = require("photoshop").action;

    let command = [
        {"_obj":"select","_target":[{"_name":"Foreground to Background","_ref":"gradientClassEvent"}]},
        {"_obj":"make","_target":[{"_ref":"contentLayer"}],"using":{"_obj":"contentLayer","type":{"_obj":"gradientLayer","angle":{"_unit":"angleUnit","_value":45.0},"gradient":{"_obj":"gradientClassEvent","colors":[{"_obj":"colorStop","color":{"_obj":"RGBColor","blue":207.000732421875,"grain":237.99636840820313,"red":101.99844360351563},"location":0,"midpoint":50,"type":{"_enum":"colorStopType","_value":"userStop"}},{"_obj":"colorStop","color":{"_obj":"RGBColor","blue":207.000732421875,"grain":67.00286865234375,"red":73.99887084960938},"location":4096,"midpoint":50,"type":{"_enum":"colorStopType","_value":"userStop"}}],"gradientForm":{"_enum":"gradientForm","_value":"customStops"},"interfaceIconFrameDimmed":4096.0,"name":"Foreground to Background","transparency":[{"_obj":"transferSpec","location":0,"midpoint":50,"opacity":{"_unit":"percentUnit","_value":100.0}},{"_obj":"transferSpec","location":4096,"midpoint":50,"opacity":{"_unit":"percentUnit","_value":100.0}}]},"gradientsInterpolationMethod":{"_enum":"gradientInterpolationMethodType","_value":"perceptual"},"kgradientsLegacyRendering":true,"type":{"_enum":"gradientType","_value":"linear"}}}}
    ];
    result = await psAction.batchPlay(command, {});
}

async function GRADIENT() {
    await require("photoshop").core.executeAsModal(GRADIENTFILL, {"commandName": "Action Commands"});
}
}