You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge ColorMine. Refactor script functions to compiled cmdlets
Originally, ColorMine had an external maintainer,
but he's taken his work down and sold the source...
I'm getting rid of the external library and the namespace.
+semver:breaking
Returns a color that is 180 degrees opposite around the Hue component of the HSL color space.
23
23
24
-
The primary reason for Get-Complement to exist is for generating contrasting colors for foreground and background. For that reason, it's usually called with `-ForceContrast` mode, which changes the lightness or darkness to increase the contrast of the returned color.
24
+
The primary reason for Get-Complement to exist is for generating contrasting colors for foreground and background. For that reason, it's usually called with `-HighContrast` mode, which changes the lightness or darkness to increase the contrast of the returned color.
25
25
26
-
It also has a `-ConsoleColor` switch that causes it to assume only 16 colors will work (PowerLine currently uses this mode by default because so many terminals don't support more --including Windows 10 prior to Creators Update). In ConsoleColor mode, it always returns White or Black.
26
+
It also has a `-BlackAndWhite` switch that causes it to assume only 16 colors will work (PowerLine currently uses this mode by default because so many terminals don't support more --including Windows 10 prior to Creators Update). In BlackAndWhite mode, it always returns White or Black.
27
27
28
28
## EXAMPLES
29
29
@@ -39,13 +39,13 @@ Gets the color Red back, as the complement for Cyan.
39
39
### ---- Example 2 -------------------------------------------------------------
This example shows how using `-Passthru` returns both the original color and the contrasting color, and how using `-ConsoleColor` results in a better contrast when you're being forced to use ConsoleColor (as with the built-in Write-Host command).
46
+
This example shows how using `-Passthru` returns both the original color and the contrasting color, and how using `-BlackAndWhite` results in a better contrast when you're being forced to use BlackAndWhite (as with the built-in Write-Host command).
47
47
48
-
You can try the example without `-ConsoleColor` to see the difference: with it, you'll get Black on Cyan, without, you'll get Red on Cyan. Note that using -ForceContrast will make almost no difference if you're using the `ConsoleColor` property, because downsampling to 16 colors has to result in either Red or DarkRed...
48
+
You can try the example without `-BlackAndWhite` to see the difference: with it, you'll get Black on Cyan, without, you'll get Red on Cyan. Note that using -HighContrast will make almost no difference if you're using the `BlackAndWhite` property, because downsampling to 16 colors has to result in either Red or DarkRed...
49
49
50
50
51
51
@@ -58,7 +58,7 @@ The source color to calculate the complement of
/// Defines the public methods for all color spaces
9
+
/// </summary>
10
+
publicinterfaceIColorSpace
11
+
{
12
+
/// <summary>
13
+
/// Initialize settings from an Rgb object
14
+
/// </summary>
15
+
/// <param name="color"></param>
16
+
voidInitialize(IRgbcolor);
17
+
18
+
/// <summary>
19
+
/// Convert the color space to Rgb, you should probably using the "To" method instead. Need to figure out a way to "hide" or otherwise remove this method from the public interface.
20
+
/// </summary>
21
+
/// <returns></returns>
22
+
IRgbToRgb();
23
+
24
+
/// <summary>
25
+
/// Convert any IColorSpace to any other IColorSpace.
26
+
/// </summary>
27
+
/// <typeparam name="T">IColorSpace type to convert to</typeparam>
28
+
/// <returns></returns>
29
+
TTo<T>()whereT:IColorSpace,new();
30
+
31
+
/// <summary>
32
+
/// Determine how close two IColorSpaces are to each other using a passed in algorithm
33
+
/// </summary>
34
+
/// <param name="compareToValue">Other IColorSpace to compare to</param>
35
+
/// <param name="comparer">Algorithm to use for comparison</param>
36
+
/// <returns>Distance in 3d space as double</returns>
0 commit comments