The approach taken here is to pass an optional `PropertySubType` parameter down the call chain from `insert_key_layered_action()` and terminating at `create_fcurve_for_channel()`, which uses it to determine the color mode for new fcurves. The parameter is optional to allow other callers (e.g. Python RNA functions) to skip passing it, in which case any new fcurves will get the default rainbow coloration. Pull Request: https://projects.blender.org/blender/blender/pulls/123022