---
title: LED Spectrum Mixer
description: Mix example LED source spectra and compare CCT, Duv, Ra, R9 and R1–R14.
canonical: https://ledyi.com/tools/led-spectrum-mixer
updatedAt: 2026-10-24T21:00:00Z
---

# LED Spectrum Mixer

Mix example LED source spectra and compare CCT, Duv, Ra, R9 and R1–R14.

## For AI agents: instructions and calculation APIs

Read the tool instructions in Markdown and the request/response schemas in OpenAPI. These public calculation APIs run the same models as the web and offline calculators. No account, API key or Turnstile is required.

- [LED Spectrum Mixer — Full tool instructions (Markdown)](https://ledyi.com/tools/led-spectrum-mixer.md)
- [OpenAPI contract](https://ledyi.com/openapi.json)
- [Agent site index](https://ledyi.com/llms.txt)

Your agent needs an HTTP tool permitted to send POST requests. Reading this page or importing OpenAPI does not automatically grant execution access.

### LED Spectrum Mixer

```
POST /api/tools/v1/spectrum-mixer
Content-Type: application/json
```

Mix the seven example source spectra exposed by this tool: warm white, cool white, red, green, blue, amber and violet. Weights are relative 0–100 inputs; omitted sources contribute zero. The CIE LED-B1/B5 arrays and Gaussian colour sources are educational examples, not LEDYI product measurements or calibrated dimmer settings.

### LED Spectrum Mixer

POST sources as a strict object containing any subset of ww, cw, r, g, b, amber and violet with finite weights from 0 to 100. The reference example uses ww=100, cw=75.98299480153439 and g=5.413065218193752. The response returns xy, CCT, Duv, Ra, R9, all R1–R14 scores, selected source definitions and stable warning codes.

| Field | Type and constraints | Meaning |
| --- | --- | --- |
| sources (Required) | {"type":"object","additionalProperties":false} | Selected example source weights. Use any subset of ww, cw, r, g, b, amber and violet. |
| sources.ww (Optional) | {"type":"number","minimum":0,"maximum":100} | Relative spectral weight from 0 to 100. Omitted sources contribute zero. |
| sources.cw (Optional) | {"type":"number","minimum":0,"maximum":100} | Relative spectral weight from 0 to 100. Omitted sources contribute zero. |
| sources.r (Optional) | {"type":"number","minimum":0,"maximum":100} | Relative spectral weight from 0 to 100. Omitted sources contribute zero. |
| sources.g (Optional) | {"type":"number","minimum":0,"maximum":100} | Relative spectral weight from 0 to 100. Omitted sources contribute zero. |
| sources.b (Optional) | {"type":"number","minimum":0,"maximum":100} | Relative spectral weight from 0 to 100. Omitted sources contribute zero. |
| sources.amber (Optional) | {"type":"number","minimum":0,"maximum":100} | Relative spectral weight from 0 to 100. Omitted sources contribute zero. |
| sources.violet (Optional) | {"type":"number","minimum":0,"maximum":100} | Relative spectral weight from 0 to 100. Omitted sources contribute zero. |

```
{
  "sources": {
    "ww": 100,
    "cw": 75.98299480153439,
    "g": 5.413065218193752
  }
}
```

### Reading the result

The model sums unit-area source spectra at 1 nm from 360–830 nm. Displayed chromaticity uses the CIE 1931 2° observer and Robertson 1968 CCT/Duv. CRI uses the CIE 1995 chain on 360–780 nm, with a Planckian reference below 5000 K and CIE daylight at or above 5000 K. Ra is the mean of R1–R8; R9 is independent. The exact implementation with source provenance is in the page and repository.

HTTP 200 returns result.status=white-light, outside-cri-domain, coloured-light or no-light. xy/CCT/Duv can be present when CRI is unavailable. individualRi, generalCriRa and r9 are null when the selected light is not applicable to this CRI method. Negative valid Ri values are retained; null is not zero. totalRelativePower is a model-unit sum, not lumens or watts.

Reject unknown source IDs, numeric strings, non-finite numbers and weights outside 0–100 with 422. Do not infer physical power, brightness, LED binning, driver settings or product performance from the example spectra. A coloured-light or unavailable-CRI 200 response is a valid model result, not an input error.

Open links.tool for the interactive mixer or links.markdown for the full source and method notes. Use the UI to save A, inspect the CIE chart, view R1–R14 bars and export CSV. The API does not persist calculations, call an AI model, send an inquiry or verify a physical instrument measurement.

### Request limits and errors

Every success carries apiVersion, a server-generated requestId, operation, normalized inputs, result, warnings and links (tool, markdown, openapi, share). requestId also appears in X-Request-Id. The domain result is deterministic; the request ID changes. Preserve warnings and special statuses when explaining results.

Send uncompressed application/json with strict types and no query parameters. Indoor lighting bodies are limited to 16 KiB; driver-match bodies to 16 KiB; battery bodies to 16 KiB; voltage bodies to 16 KiB; resistor bodies to 16 KiB; spectrum bodies to 16 KiB; DMX bodies to 1024 KiB and 1000 fixtures; pixel bodies to 64 KiB, 64 run rows, 128 outputs and 2000000 channels. DALI bodies are limited to 64 KiB, 24 rows and 512 devices. Illuminance bodies are limited to 16 KiB and 400 planned points. Photometry bodies are limited to 1024 KiB with up to 4 files and 16 by 721 query directions per file. Lighting-cost bodies are limited to 64 KiB with up to 20 groups in each scenario. Body reading expires after 5 seconds. Complete success JSON is bounded to 4 MiB. GET/HEAD return 405; OPTIONS returns 204. Source responses are no-store. Anonymous browser CORS permits POST/OPTIONS and Content-Type with credentials omitted.

Tool POST requests and ordinary page requests share 120 requests per 60 seconds per IP/Cloudflare location; mitigation lasts 60 seconds. Heavy tool use can temporarily block pages from the same source. This is not an independent or globally exact API quota. Inquiry/search use their existing separate rule. Tool POST requests do not inherit the company-page or verified-bot exemption.

Source errors use application/problem+json with status, stable code, requestId and at most one invalidParams JSON pointer. 400: malformed JSON/query; 405: method; 408: body timeout; 413: body limit; 415: media/encoding; 422: parameter/domain error; 500/503: service failure. Fix invalid inputs rather than retrying or changing engineering facts. For 429 or transient failures, use at most two retries with backoff and jitter, honoring Retry-After when present.

Cloudflare can return 403/429/5xx before the application, sometimes as HTML without CORS or Retry-After. Check HTTP status and Content-Type before parsing JSON. A browser may see only a network error. Do not present an error or an older result as a successful new calculation.

Calculations do not create inquiries, send emails, call a language model or store project results. Operational logs exclude fixture labels, groups and request bodies. Existing network/access logs still apply. Submit a quotation request only when the user asks, using the separate inquiry contract and buyer confirmation flow.

### Warning codes

| Field | Meaning |
| --- | --- |
| SPECTRUM_NO_LIGHT | All selected source weights are zero; colour and CRI metrics are undefined. |
| SPECTRUM_COLOURED_LIGHT | The selected spectrum is coloured light or outside the near-white CCT domain; white-light CRI metrics are unavailable. |
| SPECTRUM_CRI_UNAVAILABLE | The selected white point is outside the adopted CRI reference-distance limit; Ra, R9 and R1–R14 are unavailable. |

### Error codes

```
TOOLS_INVALID_JSON
TOOLS_QUERY_UNSUPPORTED
TOOLS_METHOD_NOT_ALLOWED
TOOLS_BODY_TIMEOUT
TOOLS_BODY_TOO_LARGE
TOOLS_MEDIA_TYPE_UNSUPPORTED
TOOLS_CONTENT_ENCODING_UNSUPPORTED
TOOLS_INPUT_INVALID
TOOLS_NUMERIC_DOMAIN_UNSUPPORTED
TOOLS_INTERNAL_ERROR
TOOLS_SERVICE_UNAVAILABLE
DMX_INPUT_INVALID
DMX_ADDRESS_NOT_ENCODABLE
DMX_CHANNEL_RANGE_EXCEEDED
DMX_SPACING_OVERLAP
DMX_UNIVERSE_RANGE_EXCEEDED
PHOTOMETRY_FILE_INVALID
PHOTOMETRY_FILE_UNSUPPORTED
PHOTOMETRY_LIMIT_EXCEEDED
```

## Can two spectra have the same CCT but different CRI?

Yes. CCT describes a white point; colour rendering depends on the full spectrum. Save A and compare the individual R1–R14 scores.

## Are these LEDYI product measurements?

No. The page uses CIE reference LED illuminants and idealised Gaussian colour sources. Use measured SPD data and instrument results before making a product or compliance claim.

## What does a custom source weight mean?

It is a relative unit-area spectral contribution from 0 to 100. It is not watts, lumens, electrical current, strip length or a calibrated dimmer setting.

