diff options
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs index 5818c33e5b..a083d352f2 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs @@ -88,6 +88,19 @@ namespace MonoDevelop.Components return c.ToGdkColor (); } + /// <summary> + /// Makes a color lighter or darker + /// </summary> + /// <param name='lightAmount'> + /// Amount of lightness to add. If the value is positive, the color will be lighter, + /// if negative it will be darker. Value must be between 0 and 1. + /// </param> + public static HslColor AddLight (this HslColor color, double lightAmount) + { + color.L += lightAmount; + return color; + } + public static Cairo.Color AddLight (this Cairo.Color color, double lightAmount) { var c = color.ToXwtColor (); |