l is the current lightness.x is the offset that will be regulated.L is the new lightness after regulation.Two formulas are equal to each other. L(l,x)=⎧⎩⎨l+(1−l)x,l+lx,x≥0x<0{−1≤x≤1} L(l,x)=x+|x|2+l(1−|x|){−1≤x≤1}