Color does not contain definition for HSVToRGB

private void Update()
{
m_Saturation = 1f;
m_Value = 1f;
for (int x = 0; x < 1000; x++)
{

                texture.SetPixel(x, 1, Color.HSVToRGB(m_Hue, m_Saturation, m_Value));
            m_Hue += 0.001f;
            if (m_Hue >= 1)
            {
                m_Hue = 0;
            }
        }
        texture.Apply();
		/*if (global::DebugInput.GetKeyDown(KeyCode.O))
		{
			global::LocalDamageDisplay.adminObjectShow = !global::LocalDamageDisplay.adminObjectShow;
			if (global::LocalDamageDisplay.adminObjectShow)
			{
				Debug.Log("shown object overlay", this);
			}
			else
			{
				Debug.Log("hid object overlay", this);
			}
		}
		if (global::LocalDamageDisplay.adminObjectShow && global::DebugInput.GetKeyDown(KeyCode.L))
		{
			global::LocalDamageDisplay.mode = (global::LocalDamageDisplay.mode + 1) % 2;
		}*/

	}

works in unity not in dnspy

In 99% of all cases where the compiler tells you that a class doesn’t contain a certain method you either misspellt it or you created your own class that is hiding the one you originally wanted to use / access. So in your case you may have a class / struct / type somewhere that is named “Color”.

Next time when you get a compiler error, make sure you copy it 1:1. If the compiler actually said

UnityEngine.Color doesn’t
contain a definition for HSVToRGB

It actually meant the Unity type Color. We have namespaces to avoid such confusions / collisions. If you created a type named Color in the global namespace you would have to use

UnityEngine.Color.HSVToRGB

instead of

Color.HSVToRGB

However it’s generally advised to avoid naming types the same as other existing types. If you really want to do that, place your own class in a seperate namespace.

alt texti tried doesnt work