private void checkTextureParamColorSpace(String name, Texture value) {
        MatParamTexture paramDef = (MatParamTexture) def.getMaterialParam(name);
        if (paramDef.getColorSpace() != null && paramDef.getColorSpace() != value.getImage().getColorSpace()) {
            value.getImage().setColorSpace(paramDef.getColorSpace());
            if (logger.isLoggable(Level.FINE)) {
                logger.log(Level.FINE, "Material parameter {0} needs a {1} texture, "
                                + "texture {2} was switched to {3} color space.",
                        new Object[]{name, paramDef.getColorSpace().toString(),
                                value.getName(),
                                value.getImage().getColorSpace().name()});
            }
        } else if (paramDef.getColorSpace() == null && value.getName() != null && value.getImage().getColorSpace() == ColorSpace.Linear) {
            logger.log(Level.WARNING,
                    "The texture {0} has linear color space, but the material "
                            + "parameter {2} specifies no color space requirement, this may "
                            + "lead to unexpected behavior.\nCheck if the image "
                            + "was not set to another material parameter with a linear "
                            + "color space, or that you did not set the ColorSpace to "
                            + "Linear using texture.getImage.setColorSpace().",
                    new Object[]{value.getName(), value.getImage().getColorSpace().name(), name});
        }
    }
Set a texture parameter.

@param name The name of the parameter
@param type The variable type {@link VarType}
@param value The texture value of the parameter.

@throws IllegalArgumentException is value is null
jme3-core/src/main/java/com/jme3/material/Material.java