I'm searching for a function which looks similar to the gamma distribution in the following image (the blue one). It doesn't have to be exactly a gamma function.

I need this for a programming project as weighting function. I.e. I have two parameters, minVal and maxVal. Between these two values the weight should be 1 (or near one). If x is lower than 'minVal' the weight decrease should be steep, if bigger than maxVal the weight should also decrease, but not as steep as below min.
Here a few examples for different minVal and maxVal (minVal and maxVal may be of any value, i.e. very small/large). There is no restriction for the integral of the function.

The best thing would be to have something like:
float getWeight(float x, float min, float max) {
return fancyFunction(x,min,max);
}
The fancyFunction can be anything which can be calculated by a Java programm.
Thanks!!
found a solution. It is a combination of exponential and gamma function:
Here are some plots:
