Getting the color axis of a colz histogram to a log scale

I have a 2d histogram that I would like to draw as col or colz, but I want to have the color axis be in a log scale. I have tried basically every order and permutation of the following code (moving things around, commenting out and uncommenting), but none have worked.

//hist->Draw("SPEC zs(1)");

If anyone knows how to get the color axis of a colz histogram to have a log scale, it would be very much appreciated.

I’m using root 6 on windows 11 if that matters.

It’s probably something else in your code.
This works for me:

   auto c1   = new TCanvas("c1","c1",600,400);
   auto harr = new TH2F("harr","COLZ example",20,-4,4,20,-20,20);
   float px, py;
   for (Int_t i = 0; i < 25000; i++) {

Check if you get the same with this example. If not, it’s more helpful if you post the code you are using, or a minimal example code showing what you get.