Before mixing two HEX colors, compare the exact source colors, the blend ratio and direction, the interpolation method, the intended medium, and the output format.
A HEX value and an rgb() string can describe the same screen color, but “mixing” is not a universal physical operation. For digital work, the important questions are which channel values are being averaged, how much weight each endpoint receives, and whether the result is meant for pixels rather than paint or ink. The Color Mixer makes those choices explicit with two inputs, an adjustable ratio, exact HEX and RGB output, and a gradient preview.
Start with the purpose of the blend. A hover state, a palette bridge, a chart color, and a printed ink color do not all need the same comparison or ratio.

The checks that matter before mixing
Work through these six checks before treating a mixed value as final:
- Purpose and role. Decide which color is the stable anchor and which is the direction of movement. This prevents a 50/50 blend from being used when the real goal is a small shift.
- Exact source values. Compare the full HEX or RGB values, not just color names or swatches. Two colors that look close can still produce noticeably different channel averages.
- Ratio and direction. Check how much of A and B is present. In the Color Mixer, 0% is pure Color A, 100% is pure Color B, and 50% averages the source channel values and rounds each result to a whole number.
- Interpolation method. Confirm that the result is a direct sRGB channel average. This is appropriate for screen colors, but it is not subtractive pigment mixing or gamma-corrected optical light mixing.
- Intended medium. Compare the destination with the model. A digital value can be exact for a website or app, but it cannot predict how real acrylics or printer inks will look on paper.
- Output format. Decide whether you need the lowercase six-digit HEX value or the rgb() notation, and make sure that notation fits the system where you will use it.
Record the two source values and the selected ratio. The displayed split, such as 70% A / 30% B, lets you return to the same blend instead of relying on memory or an imprecise description such as “mostly blue.”
Match the method to the result you need
Once the checks are clear, match the comparison to the design job:
| Design job | Compare first | Decision to make |
|---|---|---|
| Hover or active state | Base color and ratio | How far the state should move toward the second color |
| Palette bridge | Both endpoints and the visual midpoint | Whether a direct blend is useful or another ratio fits better |
| Gradient or color scale | Endpoint order and intermediate steps | Which transition points belong in the scale |
| Stylesheet value | HEX or rgb() output | Which exact notation the destination accepts |
| Print or ink reference | Mixing model and physical medium | Whether a physical proof is still required |
A 50/50 blend uses rounded per-channel averages, but mathematically balanced does not automatically mean appropriate. The midpoint of two source colors may be visually muted, too light, or outside the range needed for an interface state. Move the ratio and inspect the transition; do not choose a percentage only because it sounds balanced.
Mix two HEX colors with a controlled ratio
- Enter Color A. Type a short HEX such as #f00, a full HEX such as #3b82f6, or an rgb() string. You may also use the native swatch. Input is case-insensitive, extra spaces are ignored, and the leading # is optional.
- Enter Color B. Use the same accepted formats or pick the second color visually. Confirm that A and B represent the anchor and target colors you intended, because reversing them changes the direction of the blend.
- Set the ratio. Drag the slider from 0% to 100%. Use the ratio label to confirm the split: 0% is pure A, 100% is pure B, and 50% averages the source channels and rounds each result to a whole number. The result updates instantly.
- Inspect both the result and transition. Read the lowercase six-digit HEX and rgb() values in the result panel. The gradient bar shows eleven evenly spaced blend steps, including both endpoints, so you can assess where a useful intermediate appears.
- Copy the selected hex. When the ratio and result are right, click Copy to put the result hex on your clipboard, then paste it into the relevant stylesheet, design file, chart configuration, or other digital destination.
That workflow keeps the endpoint values, blend ratio, and output tied together. It also avoids a common mistake: treating the visual center of the gradient as proof that every other ratio has been checked.
What the blend calculation guarantees
For each red, green, and blue channel, the mixer applies result = round(A × (1 − ratio) + B × ratio). The ratio is constrained to the 0–1 range, channel values remain within 0–255, and the final channel values are rounded to whole numbers. At 50%, the formula averages the two source channel values, then rounds each result to a whole number.
For example, at a 50% ratio, mixing #ff0000 with #0000ff produces R = round(255 × (1 − 0.5) + 0 × 0.5) = 128, G = round(0 × (1 − 0.5) + 0 × 0.5) = 0, and B = round(0 × (1 − 0.5) + 255 × 0.5) = 128. The output is rgb(128, 0, 128), or #800080.
This is direct 8-bit sRGB arithmetic, not a perceptual color-space blend. Equal numerical movement between two endpoints does not guarantee that every intermediate color will appear equally spaced to the eye. That is why the ratio and full gradient should be compared, not just the midpoint value.
Screen values versus physical pigment
The medium is a crucial comparison because screen interpolation and physical pigment mixing answer different questions:
| Aspect | Digital sRGB blend | Physical paint or ink |
|---|---|---|
| What is calculated | A weighted average of 8-bit RGB channels | Not simulated by the Color Mixer |
| Meaning of 50% | The average of the source channel values, rounded to whole numbers | Equal physical amounts need not produce the same appearance |
| Typical destination | Websites, apps, icons, charts, and other screen designs | Acrylics or printer inks on paper |
| What the result guarantees | An exact digital HEX and RGB value | No guarantee of the final physical appearance |
The Color Mixer is suited to websites, apps, icons, charts, and other on-screen design because it returns explicit digital values and previews the transition. It does not model real acrylics or printer inks on paper. For those jobs, treat a screen blend as a starting reference and confirm the physical result with the actual material.
Final checks before using the mixed color
Before using the mixed color, run this final pass:
- Check orientation. Confirm that A and B are in the intended order and that the ratio label matches your plan.
- Confirm the endpoints. Briefly view 0% and 100% to ensure each input appears as expected.
- Review the gradient. Use the eleven-step preview to identify a practical intermediate rather than assuming the center is the only candidate.
- Cross-check the notation. Compare the result panel’s HEX and RGB values, then copy only the hex when the destination needs CSS-ready hex notation.
- Test the final context. Place the result in the actual interface or artwork and check its role there; a mathematically correct intermediate can still be unsuitable for the job.
- Save the recipe. Record both source values and the ratio so the result can be reproduced.
The Color Mixer performs the color arithmetic locally in your browser; the colors, values, and inputs are not uploaded to a server. Privacy does not replace the visual and numerical checks, but it means the comparison can be done without sending your source values elsewhere.
For a deeper look, see Find a Digital RGB Complement From a HEX Value.
For a deeper look, see What To Do If You Cannot Use the HEX Color Mixer.