Skip to content

Commit

Permalink
Single color ambient tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
seerge committed Nov 13, 2023
1 parent 0f56883 commit d859c56
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/USB/Aura.cs
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ public static void ApplyAura()
{
CustomRGB.ApplyAmbient(true);
timer.Enabled = true;
timer.Interval = 80;
timer.Interval = 120;
return;
}

Expand Down Expand Up @@ -512,10 +512,11 @@ public static void ApplyAmbient(bool init = false)
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));

Expand All @@ -531,10 +532,11 @@ public static void ApplyAmbient(bool init = false)
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);
}


Expand Down

0 comments on commit d859c56

Please sign in to comment.