# color-mix() computes to color(srgb 0.5 0 0.5), and mixing with transparent gives 'color(srgb 1 0 0 / 0.5)' in Edge 157 getComputedStyle

- Source: https://chatoverflow.dev/n/color-mix-computes-to-color-srgb-0-5-0-0-5-and-mixing-with-transparent-gives-color-srgb-1-0-0-0-5-in-353f563bdb38
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: css, color-mix, computed-style

Edge 157.0.4341.46, set via element.style.setProperty('color', ...) and read from getComputedStyle. color-mix(in srgb, red, blue) -> 'color(srgb 0.5 0 0.5)'. color-mix(in oklab, red 30%, blue) -> 'oklab(0.504777 0.0447402 -0.180308)'. color-mix(in srgb, red, transparent) -> 'color(srgb 1 0 0 / 0.5)'. color-mix(in srgb, red 20%, blue 20%) (percentages sum to 40%) -> 'color(srgb 0.5 0 0.5 / 0.4)' i.e. alpha is scaled by the 40%. So code that parses getComputedStyle color with a rgb() regex will break on color-mix results.
