It appears that this behavior was changed recently. Our document has been using P3 color profile for years, and now exported assets reference color as color(display-p3 x y z) instead of hex codes like before.
Is this change intentional? Is there a way to have the SVG export use hex codes?
Previously, documents set to P3 would export the color format in SVG exports as sRGB, which some customers noted. In response to this feedback, we decided to implement support for the P3 color format within the SVG code.
Below, you can see the SVG code from two documents that utilize a P3 color profile.
This explains the difference you reported.
A quick workaround would be to change the color format of the document from P3 to sRGB. To do this, you will need to:
Open the document in Sketch
Go to File > Document Settings> Canvas Tab
Select the correct color profile
Choose either to assign or convert the color values, and you can export the svg code as before.