ForHosting KIT · Developer Utilities

Exclusion blend two colors

The exclusion color blender combines two hexadecimal colors with the exclusion blend mode and returns the exact resulting color as normalized hex, numeric RGB channels, and a ready-to-copy CSS RGB string.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Exclusion creates a softer, lower-contrast relative of the difference blend mode: light colors tend to invert the other input, dark colors cause less change, and identical midtones can move toward gray. Both inputs are checked before calculation, so malformed, missing, or unsupported color values produce a clear validation error instead of an ambiguous result.

What the exclusion blend mode produces

Exclusion compares the two colors channel by channel, but it does not simply average them. For each red, green, and blue channel, the calculator normalizes both values, applies the exclusion relationship, and converts the result back to an eight-bit channel. Black leaves the other color unchanged, while white inverts it. Values between those endpoints create a gentler contrast than the difference blend mode usually produces. That makes exclusion useful when you want a visible interaction between colors without the severe edges or dramatic tonal separation associated with a direct difference effect. The operation is symmetric, so swapping the first and second colors produces the same result. This tool reports the normalized versions of both inputs alongside the output, making it easy to confirm exactly what was calculated. It also identifies the blend mode in the response, which is useful when results are stored with other color transformations or compared in an automated design workflow. Alpha is intentionally outside the calculation: each input represents one opaque RGB color, keeping the result predictable and portable.

How hexadecimal inputs are validated and calculated

Enter each color with three or six hexadecimal digits. A leading hash sign is optional, and uppercase or lowercase letters are accepted. Three-digit notation is expanded before calculation, so #369 becomes #336699. No named CSS colors, alpha channels, functional rgb() syntax, surrounding commentary, or partially valid values are accepted. These strict rules prevent a typo from being silently interpreted as a different color. After validation, every channel uses the standard exclusion equation: the two channel values are added, then twice their product divided by 255 is subtracted. The resulting value is rounded to the nearest whole channel so it can be represented in conventional eight-bit RGB and six-digit hexadecimal form. Calculation order does not depend on locale, machine settings, current time, random values, or an external service. The same inputs therefore return the same JSON fields and values whenever the capability runs. Because both colors are required, a missing first or second field is reported before any result is produced, with the field name included in the message.

Using the result in design and development work

Use the returned hex value wherever an opaque CSS color is accepted, or copy the RGB string into a stylesheet, design token, canvas operation, or test fixture. The separate numeric RGB object is convenient for code that needs to inspect channels without parsing a string again. Exclusion blending is especially helpful for previewing layered interface accents, poster treatments, photographic overlays, generative artwork, and hover states where a lower-contrast difference effect is desired. It can also provide a deterministic reference when checking whether two rendering systems agree on blend math. Remember that this calculator combines color values only; it does not composite transparency, account for an element backdrop, convert color profiles, or reproduce every detail of a particular graphics application. For a meaningful visual comparison, use the output in the same RGB workflow as your source colors. Browser use is available for quick experimentation, while an API request costs $0.002 when the calculation belongs in a repeatable pipeline. Since the operation has no network dependency, it is suitable for build tools and tests that require stable outputs.

Preview a softer contrast effect

Calculate the opaque color created when two palette values interact through exclusion before applying the effect in a layout.

Create deterministic design tokens

Generate a stable derived hex color for a theme, component state, illustration system, or reusable CSS variable.

Verify blend calculations

Compare a renderer or graphics pipeline against a small, explicit RGB exclusion result with normalized inputs and channel values.

What does an API calculation cost?

Each API request costs $0.002. The browser tool can be used directly on this page.

Is exclusion the same as difference blending?

No. Both compare channels, but exclusion generally produces a softer and lower-contrast effect than difference.

Which color formats are accepted?

Use three or six hexadecimal digits with an optional leading #, such as #369, 336699, or A0B1C2.

Does the order of the two colors matter?

No. The exclusion equation is symmetric, so swapping the inputs produces the same blended color.

Are transparent colors supported?

No. Inputs are opaque RGB colors; four- and eight-digit hexadecimal values with alpha are rejected.

Why might a graphics editor look slightly different?

Color profiles, linear-light workflows, transparency, compositing backdrops, and application-specific rounding can affect a visual result. This capability uses deterministic eight-bit RGB channel math.

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.

POSThttps://api.kit.forhosting.com/color/exclusion

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.

curl -X POST https://api.kit.forhosting.com/color/exclusion \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"color1":"#336699","color2":"#CC8844"}'
{
  "color1": "#336699",
  "color2": "#CC8844"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "color.exclusion",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →