Wait what if I just convert all my colors to linear RGB values anyway, use those in standard browser graphics APIs and pretend that I'm doing all blending in linear RGB space, then perform a single transformation on the final image to convert it to real sRGB for display? I'd probably lose a lot of color depth in the darker colors unfortunately, maybe too much to be worthwhile. :/