Color Burn Blend Two Colors
Color burn is a dramatic blend mode that darkens a base color according to the color placed above it.
Run — free
This capability applies the standard channel-by-channel color-burn equation to two hexadecimal colors, then returns a normalized hex value and exact RGB channels. It accepts compact or full hex notation, validates both inputs before calculation, and handles zero blend channels explicitly. The result is deterministic, making it suitable for design checks, image-pipeline tests, generated themes, and repeatable API workflows.
Choose the base and top colors in the correct order
Color burn is order-sensitive, so begin by deciding which color represents the existing surface and which color represents the layer placed over it. Enter the existing surface as base and the applied layer as top. Reversing those fields usually produces a different result because the operation is not an average and is not commutative. Each input may use three hexadecimal digits, such as <code>#48C</code>, or six digits, such as <code>#4488CC</code>. The leading hash is optional, but no alpha channel, CSS color name, RGB function, or eight-digit hex notation is accepted. Restricting the syntax keeps the calculation clear and prevents an implicit alpha-compositing rule from changing the answer. The response normalizes both inputs to uppercase six-digit hex, which makes comparisons and snapshots straightforward. It also includes the burned color as hex, an RGB object, and a ready-to-use CSS RGB string. If either required field is missing or malformed, the request fails with an input error instead of silently substituting black or attempting to repair ambiguous text.
Understand the color-burn calculation and zero guard
The calculation runs independently for red, green, and blue. For each channel, the tool subtracts the base channel from 255, scales that distance by 255 divided by the top channel, limits the scaled value to 255, and subtracts the result from 255. This is the familiar color-burn equation expressed in eight-bit RGB values. A top channel of zero needs special treatment because division by zero has no useful color meaning and can produce non-finite values in general-purpose code. Here it returns zero for that output channel explicitly, matching the defined color-burn boundary and making the behavior portable. Every other channel result is rounded to the nearest integer and clamped to the inclusive range from 0 through 255. Those fixed rules matter when a result is used in tests or generated assets: the same valid pair always returns the same bytes, regardless of request time or execution location. Color burn commonly increases contrast and pushes midtones toward shadows. White in the base tends to remain light for nonzero top channels, while darker bases can quickly reach black.
Use the result in design systems and automated pipelines
A single blend is useful when matching a graphics editor, but deterministic output becomes more valuable when it is part of a repeatable workflow. You can store the returned hex code as a design token, compare it with an expected snapshot, insert the RGB string into generated CSS, or evaluate candidate overlays before rendering a full image. Because the operation works directly on encoded RGB channels, it is best understood as a blend-mode calculator rather than a simulation of paint, ink, light, opacity, or a color-managed editing document. It does not convert profiles or linearize channels, and it does not composite transparency. For consistent production use, provide colors from the same assumed RGB space and keep their order documented beside the call. The normalized input fields in the response help with audit logs because they show exactly what was calculated. Invalid values stop early, so a malformed token cannot quietly contaminate a palette. The computation is pure and uses no network, randomness, clock, or stored state. Browser and API execution therefore follow the same algorithm; automated access costs $0.002 for each item processed.
What you can do with it
Reproduce a design blend
Calculate the color-burn result for two documented hex colors without opening an image editor.
Generate theme tokens
Turn a base and overlay pair into a stable darkened token for generated CSS or component themes.
Test rendering logic
Use deterministic RGB output as a golden value when testing a graphics or styling pipeline.
FAQ
What does one API blend cost?
Each item costs $0.002. The calculation is also available in the browser experience.
Is color burn the same as mixing two colors equally?
No. Color burn is an order-sensitive nonlinear blend mode that generally darkens the base and increases contrast.
What happens when a top RGB channel is zero?
That result channel is set to zero explicitly, avoiding division by zero and following the color-burn boundary rule.
Which color formats are accepted?
Use three- or six-digit hexadecimal RGB, with or without a leading hash. Alpha values, names, and CSS functions are rejected.
Does swapping base and top preserve the result?
No. The blend is not commutative, so swapping the two colors can change every output channel.
Does the capability apply opacity or color profiles?
No. It calculates the opaque color-burn function directly on the supplied eight-bit RGB channels.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/color/color-burn \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"base":"#808080","top":"#808080"}'const res = await fetch("https://api.kit.forhosting.com/color/color-burn", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"base": "#808080",
"top": "#808080"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/color/color-burn",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"base": "#808080",
"top": "#808080"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/color/color-burn", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"base":"#808080","top":"#808080"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"base":"#808080","top":"#808080"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/color/color-burn", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"base": "#808080",
"top": "#808080"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "color.color_burn",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |