diff --git a/Project-Aurora/Project-Aurora/Settings/Layers/AmbilightLayerHandler.cs b/Project-Aurora/Project-Aurora/Settings/Layers/AmbilightLayerHandler.cs
index d35f95781..3110dd8c7 100644
--- a/Project-Aurora/Project-Aurora/Settings/Layers/AmbilightLayerHandler.cs
+++ b/Project-Aurora/Project-Aurora/Settings/Layers/AmbilightLayerHandler.cs
@@ -346,7 +346,18 @@ public override EffectLayer Render(IGameState gamestate)
break;
case AmbilightType.AverageColor:
- ambilight_layer.Set(Properties.Sequence, BitmapUtils.GetAverageColor(screen));
+ var average = BitmapUtils.GetAverageColor(screen);
+
+ if (Properties.BrightenImage)
+ average = ColorUtils.ChangeBrightness(average, Properties.BrightnessChange);
+
+ if (Properties.SaturateImage)
+ average = ColorUtils.ChangeSaturation(average, Properties.SaturationChange);
+
+ if (Properties.HueShiftImage)
+ average = ColorUtils.ChangeHue(average, Properties.HueShiftAngle);
+
+ ambilight_layer.Set(Properties.Sequence, average);
break;
}
diff --git a/Project-Aurora/Project-Aurora/Settings/Layers/Control_AmbilightLayer.xaml b/Project-Aurora/Project-Aurora/Settings/Layers/Control_AmbilightLayer.xaml
index c55876a54..d2d7b7c87 100644
--- a/Project-Aurora/Project-Aurora/Settings/Layers/Control_AmbilightLayer.xaml
+++ b/Project-Aurora/Project-Aurora/Settings/Layers/Control_AmbilightLayer.xaml
@@ -157,11 +157,11 @@
-
+
-
+
diff --git a/Project-Aurora/Project-Aurora/Settings/PluginManager.cs b/Project-Aurora/Project-Aurora/Settings/PluginManager.cs
index c5f57356c..56132ad83 100644
--- a/Project-Aurora/Project-Aurora/Settings/PluginManager.cs
+++ b/Project-Aurora/Project-Aurora/Settings/PluginManager.cs
@@ -145,7 +145,14 @@ public void ProcessManager(object manager)
{
foreach (var plugin in this.Plugins)
{
- plugin.Value.ProcessManager(manager);
+ try
+ {
+ plugin.Value.ProcessManager(manager);
+ }
+ catch(Exception e)
+ {
+ Global.logger.Error($"Failed to load plugin {plugin.Key}: {e.Message}");
+ }
}
}
diff --git a/Project-Aurora/Project-Aurora/Utils/BitmapUtils.cs b/Project-Aurora/Project-Aurora/Utils/BitmapUtils.cs
index 482eeafae..f97cf2ea4 100644
--- a/Project-Aurora/Project-Aurora/Utils/BitmapUtils.cs
+++ b/Project-Aurora/Project-Aurora/Utils/BitmapUtils.cs
@@ -83,21 +83,21 @@ public static Color GetAverageColor(Image screenshot)
/// Returns a color matrix that when applied to an image alters its brightness.
/// Taken from https://docs.rainmeter.net/tips/colormatrix-guide/
///
- /// Brightness (-1..1)
+ /// Brightness (0..4)
///
public static float[][] GetBrightnessColorMatrix(float b) => new float[][] {
- new float[] {1, 0, 0, 0, 0},//red
- new float[] {0, 1, 0, 0, 0},//green
- new float[] {0, 0, 1, 0, 0},//blue
+ new float[] {b, 0, 0, 0, 0},//red
+ new float[] {0, b, 0, 0, 0},//green
+ new float[] {0, 0, b, 0, 0},//blue
new float[] {0, 0, 0, 1, 0},//alpha
- new float[] {b, b, b, 0, 1}
+ new float[] {0, 0, 0, 0, 1}
};
///
/// Returns a color matrix that when applied to an image alters its saturation.
/// Taken from https://docs.rainmeter.net/tips/colormatrix-guide/
///
- /// Saturation (0..~5)
+ /// Saturation (0..4)
///
public static float[][] GetSaturationColorMatrix(float s)
{