How to apply ColorUsageAttribute.hdr?

I want to change the emission of a material.

I understand that I need to use hdr color to do that correctly.

How exactly do I apply ColorUsageAttribute.hdr.

The manual example script is missing. Unity - Scripting API: ColorUsageAttribute.hdr

I know this answer is late, but I’ve found it out by experimenting.
You add the attribute to a Color variable with square brackets ([ColorUsage()]), then use one of the constructors of ColorUsageAttribute. For example:

[ColorUsage(false, true)] public Color hdrColorWithoutAlpha = Color.white;
1 Like