How to attract or repel a gameobject towards a platform?

Can anyone help me with the following Attractor script?

I want player to get repelled if it has same color as the attractor and attracted towards it when player color is different

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

public class Attractor : MonoBehaviour
{
    public LayerMask AttractionLayer;
    public float gravity = -9;
    [SerializeField] private float Radius = 1.5f;
    public List<Collider2D> AttractedObjects = new List<Collider2D>();
    [HideInInspector] public Transform attractorTransform;

    [SerializeField] private Attractable currentAttractable;
    [SerializeField] private PlayerController playerController;


    private SpriteRenderer poleNSR;
    private SpriteRenderer poleSSR;
    private GameObject PoleN;
    private GameObject PoleS;

    [SerializeField] GameObject user;


    private void Start()
    {

        PoleN = GameObject.FindWithTag("North");
        PoleS = GameObject.FindWithTag("South");
        poleNSR = PoleN.GetComponent<SpriteRenderer>();
        poleSSR = PoleS.GetComponent<SpriteRenderer>();
    }
    void Awake()
    {
        attractorTransform = GetComponent<Transform>();
        playerController = GameObject.Find("Player").GetComponent<PlayerController>();
        currentAttractable = user.GetComponent<Attractable>();
    }

    void Update()
    {
        SetAttractedObjects();

        if (playerController.sr.color == Color.red)
        {
            currentAttractable.gravityStrength = -100;
        }
        else if (playerController.sr.color != Color.red && playerController.sr.color != Color.cyan)
        {
            currentAttractable.gravityStrength = 100;
        }

        if (playerController.sr.color == Color.cyan)
        {
            currentAttractable.gravityStrength = 0;
        }

        
    }

    void FixedUpdate()
    {
        AttractObjects();
    }

    void SetAttractedObjects()
    {
        AttractedObjects = Physics2D.OverlapCircleAll(attractorTransform.position, Radius, AttractionLayer).ToList();
    }

    void AttractObjects()
    {
        for (int i = 0; i < AttractedObjects.Count; i++)
        {
            AttractedObjects[i].GetComponent<Attractable>().Attract(this);
        }
    }

    void OnDrawGizmosSelected()
    {
        Gizmos.color = Color.magenta;
        Gizmos.DrawWireSphere(transform.position, Radius);
    }

}