public void SetIndex(int index)
    {
        MulticoloredList componentInParent = GetComponentInParent <MulticoloredList>();

        if (componentInParent != null)
        {
            Image component = GetComponent <Image>();
            component.color = componentInParent.GetColorForIndex(index);
        }
    }
 private void Start()
 {
     if (multicoloredList == null)
     {
         multicoloredList = GetComponentInParent <MulticoloredList>();
         if (multicoloredList == null)
         {
             throw new MissingReferenceException("MulticoloredListElements must be a child of a MulticoloredList");
         }
     }
     multicoloredList.Refresh();
 }
        private void onRemoveAccount(string username, LoginRememberMeListButton button)
        {
            rememberedButtons.Remove(button);
            button.gameObject.SetActive(value: false);
            Object.Destroy(button.gameObject);
            RememberMeService rememberMeService = Service.Get <RememberMeService>();

            rememberMeService.RemoveUsername(username);
            MulticoloredList componentInChildren = GetComponentInChildren <MulticoloredList>();

            if (componentInChildren != null)
            {
                componentInChildren.Refresh();
            }
        }