mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Single color ambient tweaks
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user