How to use non-MonoBehaviour class in a unity Script

I can’t understand why when I use a method of the Colors class in PlayerMovement, the PlayerMovement component is disabled.

The class Colors is:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Colors
{
    private Color[] color = new Color[3];

    public Colors()
    {
        color[0] = Color.red;
        color[1] = Color.blue;
        color[3] = Color.green;
    }

    public Color chooseRandomColor()
    {
        int index = Random.Range(0, 3);
        return color[index];
    }

    public bool areColorEquals(Color color1, Color color2)
    {
        if (color1 == color2)
            return true;
        else
            return false;
    }

}

The class PlayerMovement is:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerMovement : MonoBehaviour
{
    Colors playerColor = new Colors();

    //componenti
    private Rigidbody2D playerRb;
    private SpriteRenderer playerSpriteRenderer;

    [Header("Movimento")]
    [SerializeField] private float horizontalSpeed;
    private float horizontalInput;


    // Start is called before the first frame update
    void Awake()
    {
        playerRb = gameObject.GetComponent<Rigidbody2D>();
        playerSpriteRenderer = gameObject.GetComponent<SpriteRenderer>();

        playerSpriteRenderer.color = playerColor.chooseRandomColor();

    }

    private void Start()
    {    }

    private void Update()
    {
        horizontalInput = Input.GetAxisRaw("Horizontal");
    }

    // Update is called once per frame
    void FixedUpdate()
    {
        playerRb.MovePosition(playerRb.position + Vector2.right 
                            * horizontalInput * horizontalSpeed * Time.fixedDeltaTime);
    }
    private void OnTriggerEnter2D(Collider2D collision)
    {
        Debug.Log("Morto");
        if (collision.gameObject.tag == "Block")
        {
            Object.Destroy(gameObject, 0f);
        }
    }
}

In Colors class constructor green color assignment is out of array range. So Unity receives an exception when instantiating your component and probably decides that it is unusable.

I solved the problem using static methods, but I still don’t understand why the problem should arise