In HDR mode, if you want to use lovr.graphics.setBackgroundColor, or Pass:setColor, or send a color to a shader, and you want to use an sRGB color, there's no easy way to convert that to Rec2020. Once you're in a shader, you can use rec2020ToSRGB / sRGBToRec2020, but this doesn't work for the background color.
lovr.math already has srgb <-> linear conversions, so it would make sense to add similar conversions for srgb <-> rec2020. A helper for encoding/decoding the PQ transfer function would be nice too.
In HDR mode, if you want to use
lovr.graphics.setBackgroundColor, orPass:setColor, or send a color to a shader, and you want to use an sRGB color, there's no easy way to convert that to Rec2020. Once you're in a shader, you can userec2020ToSRGB/sRGBToRec2020, but this doesn't work for the background color.lovr.math already has srgb <-> linear conversions, so it would make sense to add similar conversions for srgb <-> rec2020. A helper for encoding/decoding the PQ transfer function would be nice too.