Add a color input and output to OSL shader
In OSL, you can use color as type of parameter. For example see here your script. I changed the tex parameter and the Result parameter

shader Exp_Shader(
    color tex = 0,
    float OldMax = 1,
    float OldMin = 0,
    float NewMax = 1,
    float NewMin = 0,
    output color Result = 0,
)
{
    Result = (((tex - OldMin)*(NewMax-NewMin))/(OldMax-OldMin)) + NewMin; 
}


After doing this and pressing the refresh button the Script node will look like this:


Hope this answers your question.