Developer tools
Two-colour sRGB and linear-light mixture
Mix two hex colours by a chosen share of the second colour in encoded sRGB or linear light, with alpha-premultiplied blending and an 8-bit result.
The example values can be changed. Press Calculate to update the result; you can download it as TXT or CSV and collect scenarios in this tab. Nothing is saved or sent automatically.
Result
Method:
Strict hex3/4/6/8 digits. Rounded 8-bit sRGB, no print/ICC or physical pigment matching. Press Calculate to update the result; you can download it as TXT or CSV. Own formulas, no external library, font or image. Swatch preview only; codes remain in the report. Alpha-premultiplied encoded or linear-light sRGB interpolation. Transparent result uses zero channels. Not physical paint, subtractive spectrum, source 2–8 colour mode. JSON and HTML contain inputs. Numeric values are original calculation values; existing report precision is retained. Optional live calculation is initially off. No automatic storage or transmission. Additional own CSS/SVG/PNG files show calculated CSS code or 240×60 result swatches over white. No gradient geometry, embedded font or external image.
Decimal results are approximate. Inputs stay in this browser tab.
How it works
Own bounded colour formulas: basic sRGB/HSL, alpha mixture, deterministic palettes and three-stop CSS. Own structured JSON/result-row TXT/printable HTML files retain original inputs, options and result values. Strict hex3/4/6/8 digits. Rounded 8-bit sRGB, no print/ICC or physical pigment matching. Press Calculate to update the result; you can download it as TXT or CSV. Own formulas, no external library, font or image. Swatch preview only; codes remain in the report. Alpha-premultiplied encoded or linear-light sRGB interpolation. Transparent result uses zero channels. Not physical paint, subtractive spectrum, source 2–8 colour mode. JSON and HTML contain inputs. Numeric values are original calculation values; existing report precision is retained. Optional live calculation is initially off. No automatic storage or transmission. Additional own CSS/SVG/PNG files show calculated CSS code or 240×60 result swatches over white. No gradient geometry, embedded font or external image.
Worked example
With these example values the calculator gives the result below. You can change any value in the form above.
Inputs
- First hex colour
- #000000
- Second hex colour
- #FFFFFF
- Second colour share: 0–1
- 0.5
- Interpolation space
- Linear-light sRGB
Result
- RGB hex
- #BCBCBC
- RGBA hex
- #BCBCBCFF
- RGB CSS
- rgba(188, 188, 188, 1)
- HSL CSS
- hsla(0, 0%, 73.72549%, 1)
- Red
- 188
- Green
- 188
- Blue
- 188
- Alpha
- 1
- Hue: degrees
- 0
- Saturation: percent
- 0
- Lightness: percent
- 73.7254901961
- First colour
- #000000FF
Frequently asked questions
How do I mix two hex colours?
Enter two hex colours, set the share of the second colour from 0 to 1, choose encoded or linear-light sRGB and calculate. Mixing #000000 and #FFFFFF at 0.5 in linear light gives #BCBCBC.
How does the colour mixer handle transparency?
Interpolation is alpha-premultiplied. When the result is fully transparent, its colour channels are set to zero by convention.
Which hex colour formats are accepted?
Strict hex codes with 3, 4, 6 or 8 digits are accepted. The result is rounded to 8-bit sRGB and given as hex, RGBA and HSLA.
Does the hex colour mixer predict paint or pigment mixing?
No. It gives no physical paint, pigment or subtractive spectrum recipe and no print or ICC matching.
In what formats can I download the mixed colour?
You can download JSON, printable HTML, TXT result rows, CSS code and 240×60 swatches as SVG or PNG over white. The swatches do not show gradient geometry.