Providing specific colors to visualizations in OpenSearch Dashboards and disabling color palette

I need to provide specific colors to the visualizations (while creating them). And need to disable the showing of a color palette in a dashboard.
I searched about how it can be done, but I was unable to find a solution for the same.
Is there any way, so that I can provide specific colors while creating a graph, and not give an option to a user for changing the colors in the dashboard?

It’s been awhile since I did this, but I think if you go to the “Stack Management.Saved Objects” selector, and then “inspect” the visualization, in the section uiStateJSON you can add something like:

{
  "vis": {
    "colors": {
      "0": "#32A15B",
      "1": "#B6EE8B",
      "2": "#00FFFF",
      "3": "#FFFF00",
      "4": "#FFA500",
      "5": "#FF0000"
    }
  }
}

Setting the color for the given value.

Thanks a lot @rick98. This is exactly what I was looking for.

@rick98 : What if you want to use specific color for fixed terms in a terms agregation? I’ve tried this:

{
“vis”: {
“colors”: {
“critical”: “#c1553f”,
“high”: “#e7664c”,
“medium”: “#da8b45”,
“low”: “#ddca73”,
“untriaged”: “#dddd73
}
}
}

but the colors still change when I apply control filters.

Any clues?
Thanks,
Fernando