How do i keep the color of the button set on runtime while changing scenes in unity

I have made some buttons which when clicked shows up a slider. Slider slides till three points. first green, second yellow and third red. If the user slides till any of these points, it also changes the color of that button. When I set the color of button and goes to another scene and come back to same scene again, the color that I set disappears. I want the color to stay there on runtime. I have applied dontdestroyonload but it only works on gameobjects, not the color property. I have applied Playerprefs but doesn’t work. I have also set static to my program and it also doesn’t work. I can’t figure out the solution. Please help me. The images in the program are applied above the buttons.

This is my program

using UnityEngine; using UnityEngine.UI;

public class customButton : MonoBehaviour {

public Image neckImage, FRShoulder, FLShoulder, FLChest  public Slider s1, s2, s3, s4  Color newColor = new Color(0.2745098f, 0.2745098f, 0.2745098f, 0.8745098f);   public void Start() {     neckImage.color = FRShoulder.color = FLShoulder.color = FLChest.color = newColor; }   public void resetButton() {     s1.value =   s2.value =  s3.value =  s4.value = 0;      neckImage.color = FRShoulder.color = FLShoulder.color = FLChest.color  = newColor; }