From d859c56e27a97d5dcc2e972cc86c03e9d18ed097 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Mon, 13 Nov 2023 23:05:34 +0100 Subject: [PATCH] Single color ambient tweaks --- app/USB/Aura.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/USB/Aura.cs b/app/USB/Aura.cs index 5e4fa18d..1fe9c4f8 100644 --- a/app/USB/Aura.cs +++ b/app/USB/Aura.cs @@ -449,7 +449,7 @@ namespace GHelper.USB { CustomRGB.ApplyAmbient(true); timer.Enabled = true; - timer.Interval = 80; + timer.Interval = 120; return; } @@ -512,10 +512,11 @@ namespace GHelper.USB bound.Height -= (int)Math.Round(bound.Height * (0.33f + 0.022f)); // cut 1/3 of the top screen + windows panel var screen_low = AmbientData.CamptureScreen(bound, 512, 288); - Bitmap screeb_pxl = AmbientData.ResizeImage(screen_low, 4, 2); // 4x2 zone. top for keyboard and bot for lightbar + Bitmap screeb_pxl; if (isStrix) //laptop with lightbar { + screeb_pxl = AmbientData.ResizeImage(screen_low, 4, 2); // 4x2 zone. top for keyboard and bot for lightbar var mid_left = ColorUtils.GetMidColor(screeb_pxl.GetPixel(0, 1), screeb_pxl.GetPixel(1, 1)); var mid_right = ColorUtils.GetMidColor(screeb_pxl.GetPixel(2, 1), screeb_pxl.GetPixel(3, 1)); @@ -531,10 +532,11 @@ namespace GHelper.USB for (int i = 0; i < 4; i++) // keyboard AmbientData.Colors[i].RGB = ColorUtils.HSV.UpSaturation(screeb_pxl.GetPixel(i, 0)); } - else + else { + screeb_pxl = AmbientData.ResizeImage(screen_low, 4, 1); for (int i = 0; i < 4; i++) //just color transfer from the bottom screen on keyboard - AmbientData.Colors[i].RGB = ColorUtils.HSV.UpSaturation(screeb_pxl.GetPixel(i, 1)); + AmbientData.Colors[i].RGB = ColorUtils.HSV.UpSaturation(ColorUtils.GetMidColor(screeb_pxl.GetPixel(1, 0), screeb_pxl.GetPixel(2, 0)), (float)0.7); }