colorize

The colorize transformation tints an image with a specific color, creating vintage effects like sepia toning or applying a monochromatic color overlay. Works best on grayscale or desaturated images. Perfect for creating themed galleries, vintage aesthetics, or applying consistent brand colors.

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/colorize:color=HEX/ASSET_ID.jpg

Examples

Colorize with Sepia Tone

curl -i GET https://media.vyso.io/colorize:color=d4a574/ASSET_ID.jpg

Colorize with Blue Tint

curl -i GET https://media.vyso.io/colorize:color=4a90e2/ASSET_ID.jpg

Colorize with Red Tint

curl -i GET https://media.vyso.io/colorize:color=e74c3c/ASSET_ID.jpg

Colorize with Green Tint

curl -i GET https://media.vyso.io/colorize:color=2ecc71/ASSET_ID.jpg

Colorize with Custom Purple

curl -i GET https://media.vyso.io/colorize:color=9b59b6:saturation=0.5/ASSET_ID.jpg

On 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

colorREQUIRED

The tint color to apply. Accepted formats:

  • Hex color (without #): d4a574 (sepia)
  • CSS color name: sepia
  • 6-digit hex format required for hex colors
saturationOPTIONAL

Intensity of the color tint. Accepted values:

  • Range: 0.0 to 1.0
  • 0.0 - No tinting
  • 1.0 - Full saturation (default)
  • 0.5 - Subtle tint

Response

The API returns a colorized version of the image with the specified color tint applied. 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)