Write the code for the function
newColorValue(colorValue: Int, factor: Float, offset: Int): Int
which has the same functionality as the RescaleOp class, but for only one color value. It calculates newColorValue = (colorValue * factor) + offset taking into account the type of each argument and then truncates the result if needed.
colorValue is the value of a color (integer representation) and the same holds for the function return type.