- Media API
- Transformations
- Adjust
- colorBalance
colorBalance
The colorBalance transformation adjusts color balance independently across shadows, midtones, and highlights using cyan-red, magenta-green, and yellow-blue axes. Professional-grade color correction for correcting color casts and achieving desired color grading.
Serving Content via CDN
The Media API is a CDN-based service that serves transformed images via GET requests. When you request a transformed image URL, the transformation is applied dynamically on the first request and then cached for subsequent requests.
URL Pattern
https://media.vyso.io/color-balance:cyan=C:magenta=M:yellow=Y:target=T/ASSET_ID.jpgExamples
Warm Shadows (Add Red)
curl -i GET https://media.vyso.io/color-balance:cyan=-20:target=shadows/ASSET_ID.jpgCool Highlights (Add Cyan)
curl -i GET https://media.vyso.io/color-balance:cyan=20:target=highlights/ASSET_ID.jpgGreen Midtones Correction
curl -i GET https://media.vyso.io/color-balance:magenta=15/ASSET_ID.jpgWarm Overall Tone (Yellow)
curl -i GET https://media.vyso.io/color-balance:yellow=20:target=midtones/ASSET_ID.jpgComplex Color Grading
curl -i GET https://media.vyso.io/color-balance:cyan=-15:magenta=10:yellow=5:target=shadows/ASSET_ID.jpgOn the first request, you'll receive a X-Cache: MISS header while the transformation is applied and cached. Subsequent requests will return X-Cache: HIT.
Parameters
cyanOPTIONALCyan-Red adjustment. Accepted values:
- Range: -100 to 100
- Negative values add cyan (cool); positive values add red (warm)
-20- Add cyan coolness20- Add red warmth
magentaOPTIONALMagenta-Green adjustment. Negative values add green; positive add magenta.
yellowOPTIONALYellow-Blue adjustment. Negative values add blue; positive add yellow.
targetOPTIONALTonal range to adjust. Accepted values:
shadows- Dark areas (0-⅓ brightness)midtones- Mid tones (default, ⅓-⅔ brightness)highlights- Bright areas (⅔-1 brightness)- Combine multiple targets for complete color grading
Response
The API returns the color-balanced image. The response format depends on the format of the asset stored in the Vyso asset cloud.
Content-Type: Determined by the stored asset format (e.g., image/jpeg, image/png)