Color Levels
Short answer
Color levels correct the tonal range of an image from its URL. Set colorlevel.white from 1 to 255 (default 255) and colorlevel.black from 0 to 254 (default 0), alone or together. Raising the white level can turn an off-white product background pure white. Add histogram=rgb to see the image's tonal range as a chart.
After reading this you will know
- How to set the white and black levels of an image
- How to get a pure white background for product photos
- How to show an image's histogram
Fix the tonal range and color balance of an image by adding colorlevel options to its URL. Try them in the demo below.

OriginalWith optionscolorlevel.white is set on a scale from 1 to 255, where 255 is the default.
https://demo.sirv.com/rocky.jpg?colorlevel.white=204
colorlevel.black is set on a scale from 0 to 254, where 0 is the default.
https://demo.sirv.com/rocky.jpg?colorlevel.black=43
Black and white together
Section titled “Black and white together”Black and white levels can be applied at the same time:
https://demo.sirv.com/rocky.jpg?colorlevel.white=204
Pure white background
Section titled “Pure white background”Levels can be used to obtain pure white backgrounds, desirable for ecommerce product photography.
Below, Sirv turns an off-white background to pure white. Then it shows an automatically cropped version, using Sirv’s autocrop feature:

Original

Increased white levels

White levels and autocrop
https://demo.sirv.com/caviar.jpg
https://demo.sirv.com/caviar.jpg
https://demo.sirv.com/caviar.jpg
Histogram
Section titled “Histogram”Sirv can generate a histogram of your image, to help you understand its tonal range. It analyses each pixel of your image and plots it as a chart.
The chart’s numerical range goes from 0-255, counting pixels of 0 as totally black and pixels of 255 as totally white.
histogram can be set as rgb (for red, green and blue), or any of r/g/b separately.
https://demo.sirv.com/rocky.jpg?histogram=rgb
