Skip to content
HALOWERK

Tonwerk

color match

Samples up to 12 frames of the target window and of the reference (video or image) at 160 px width in RGB, builds 256-bin histograms per channel and derives a monotone 1D LUT: method histogram = histogram specification (CDF matching, midpoint quantiles), method mean_std = per-channel mean and standard deviation transfer (Reinhard et al. 2001, applied in RGB). strength blends the LUT with identity. The LUT is written as Adobe/Resolve .cube (LUT_1D_SIZE 256, domain 0-1), applied with ffmpeg.

POST https://ton.halowerk.com/v1/color-match

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
video_base64stringNoTarget video file (the clip to correct) as base64 (MP4/MOV, WebM/MKV, AVI, MPEG-TS, MPEG-PS, FLV, Ogg or animated GIF; at most 10 MiB decoded; a data: URL prefix is accepted).
video_urlstringNoPublic http(s) URL of the target video file (the clip to correct) (at most 10 MiB; private, local and reserved addresses are refused).
start_snumberNoStart of the analysed range in seconds.
duration_snumberNoLength of the analysed range in seconds (at most 30; default: to the end of the video).
reference_base64stringNoReference video file as base64 (MP4/MOV, WebM/MKV, AVI, MPEG-TS, MPEG-PS, FLV, Ogg or animated GIF; at most 10 MiB decoded; a data: URL prefix is accepted).
reference_urlstringNoPublic http(s) URL of the reference video file (at most 10 MiB; private, local and reserved addresses are refused).
reference_image_base64stringNoReference still image as base64 (PNG, JPEG or WebP; at most 10 MiB decoded; a data: URL prefix is accepted).
reference_image_urlstringNoPublic http(s) URL of the reference still image (at most 10 MiB; private, local and reserved addresses are refused).
methodstringNoMatching method.
strengthnumberNoBlend between no change (0) and full match (1).
qualitystringNoH.264 quality: small (CRF 28), balanced (CRF 23) or high (CRF 19).
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "video_base64": {
      "type": "string",
      "minLength": 16,
      "maxLength": 14000000,
      "description": "Target video file (the clip to correct) as base64 (MP4/MOV, WebM/MKV, AVI, MPEG-TS, MPEG-PS, FLV, Ogg or animated GIF; at most 10 MiB decoded; a data: URL prefix is accepted)."
    },
    "video_url": {
      "type": "string",
      "format": "uri",
      "pattern": "^https?://",
      "maxLength": 2048,
      "description": "Public http(s) URL of the target video file (the clip to correct) (at most 10 MiB; private, local and reserved addresses are refused)."
    },
    "start_s": {
      "type": "number",
      "minimum": 0,
      "maximum": 36000,
      "default": 0,
      "description": "Start of the analysed range in seconds."
    },
    "duration_s": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 30,
      "description": "Length of the analysed range in seconds (at most 30; default: to the end of the video)."
    },
    "reference_base64": {
      "type": "string",
      "minLength": 16,
      "maxLength": 14000000,
      "description": "Reference video file as base64 (MP4/MOV, WebM/MKV, AVI, MPEG-TS, MPEG-PS, FLV, Ogg or animated GIF; at most 10 MiB decoded; a data: URL prefix is accepted)."
    },
    "reference_url": {
      "type": "string",
      "format": "uri",
      "pattern": "^https?://",
      "maxLength": 2048,
      "description": "Public http(s) URL of the reference video file (at most 10 MiB; private, local and reserved addresses are refused)."
    },
    "reference_image_base64": {
      "type": "string",
      "minLength": 16,
      "maxLength": 14000000,
      "description": "Reference still image as base64 (PNG, JPEG or WebP; at most 10 MiB decoded; a data: URL prefix is accepted)."
    },
    "reference_image_url": {
      "type": "string",
      "format": "uri",
      "pattern": "^https?://",
      "maxLength": 2048,
      "description": "Public http(s) URL of the reference still image (at most 10 MiB; private, local and reserved addresses are refused)."
    },
    "method": {
      "type": "string",
      "enum": [
        "histogram",
        "mean_std"
      ],
      "default": "histogram",
      "description": "Matching method."
    },
    "strength": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "default": 1,
      "description": "Blend between no change (0) and full match (1)."
    },
    "quality": {
      "type": "string",
      "enum": [
        "small",
        "balanced",
        "high"
      ],
      "default": "balanced",
      "description": "H.264 quality: small (CRF 28), balanced (CRF 23) or high (CRF 19)."
    }
  }
}

Open original schema

Published input example

{
  "video_url": "https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif",
  "reference_url": "https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif",
  "method": "mean_std",
  "strength": 0.5
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’