Mapping color texture in a part of geometry surface

This is a UV unwrapping I make it in Blender:

I exported it as GLTF with UVs and imported the mesh in Threejs:

this.cubePost2Model = this.resources.items.cubePost2.scene

Then apply a texture:

   this.cubePost2Model.traverse((child) =>
    {
        if(child instanceof THREE.Mesh)
        {
            child.castShadow = true
            child.material = this.material
        }
    })

As can be seen, the exterior of the texture is clamped to the edges because wrapS and wrapT are set to default THREE.ClampToEdgeWrapping

Is there a way to achieve the mapping as in Blender? I mean, with a solid color in the surface of the geometry outside of texture.

The other possible values for wrapS and wrapT are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping so I can’t find the way to do it.

Thanks.

A typical way to avoid the stretched artifacts is to add a 1 pixel wide border with your desired color to the texture.

Unfortunately, I can’t tell you how Blender renders the textured mesh.

Yes, I thought about that possibility, but it seems very expensive in terms of editing. The textures are dynamically loaded from each post in a WordPress CMS and the editor should manually modify the images before uploading them to the CMS. Maybe modifying the image in the server with ImageMagic or something like that…