Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heatmap Color range increase #3716

Open
2 tasks done
FelipeAlma opened this issue Feb 13, 2025 · 2 comments
Open
2 tasks done

Heatmap Color range increase #3716

FelipeAlma opened this issue Feb 13, 2025 · 2 comments
Labels
question Further information is requested

Comments

@FelipeAlma
Copy link

Rules

  • I made myself familiar with the Readme, FAQ and Troubleshooting.
  • I understand that, if insufficient information will be provided, my issue will be closed without an answer.

Is your feature request related to a problem? Please describe

Not a problem but an improve

Describe the solution you'd like

It would be nice to have a wider color gamut for the heatmap.

Currently I have to edit the code every time there is a new version, copy my code and paste it in the new version, the compile.

In my code colors are going from White (Freeze) to Blue (Cold) to Green (Fresh) to Yellow (Warm) to Red (Hot), it's a small modification to the whole code but looks really nice.

In the video you can see the functionality of the code proposed (had to be chopped to make it shorter , because can't increase the temp in linear way)

WhatsApp.Video.2025-02-13.at.16.03.39.mp4

Describe alternatives you've considered

        public static void ApplyHeatmap(bool init = false)
        {
            float cpuTemp = (float)HardwareControl.GetCPUTemp();
            int freeze = 40, cold = 55, fresh = 65, warm = 75, hot = 83;
            Color color;

            if (cpuTemp < cold)
            { 
                color = ColorUtils.GetWeightedAverage(Color.White, Color.Blue, ((float)cpuTemp - freeze) / (cold - freeze));
            }
            else if (cpuTemp < fresh) 
            {
                color = ColorUtils.GetWeightedAverage(Color.Blue, Color.Green, ((float)cpuTemp - cold) / (fresh - cold));
            }
            else if (cpuTemp < warm)
            {
                color = ColorUtils.GetWeightedAverage(Color.Green, Color.Yellow, ((float)cpuTemp - fresh) / (warm - fresh));
            }
            else if (cpuTemp < hot)
            {
                color = ColorUtils.GetWeightedAverage(Color.Yellow, Color.Red, ((float)cpuTemp - warm) / (hot - warm));
            }
            else color = Color.Red;

            ApplyDirect(color, init);
        }

Device and Model

ROG Strix SCAR 18 G834JZR

Additional information.

No response

@seerge
Copy link
Owner

seerge commented Feb 13, 2025

@FelipeAlma hello,

Actually in 0.203 I have made temperature values configurable #3602

Of course I can add one more "step" like you did i.e. "fresh" ? why btw fresh btw? :) or may be you can achieve similar result by just shifting colors via config already ?

@seerge seerge added the question Further information is requested label Feb 13, 2025
@FelipeAlma
Copy link
Author

FelipeAlma commented Feb 14, 2025

It's for fresh like in "The fresh prince" not cold nor warm.... cool.. In my PC when idling or doing nothing special it goes down to white then mix with blue then teal then green, looks really nice, please give it a try, I think you will like it...

Not sure where to config the colors and temps you say by the way

found it, TX, : "Power user" settings require editing config located at %AppData%\GHelper\config.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants