PaletteGrayscale16(Color32, Boolean) Method
Namespace: KGySoft.Drawing.ImagingAssembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 8.1.0
public static Palette Grayscale16(
Color32 backColor = default,
bool directMapping = false
)
Public Shared Function Grayscale16 (
Optional backColor As Color32 = Nothing,
Optional directMapping As Boolean = false
) As Palette
public:
static Palette^ Grayscale16(
Color32 backColor = Color32(),
bool directMapping = false
)
static member Grayscale16 :
?backColor : Color32 *
?directMapping : bool
(* Defaults:
let _backColor = defaultArg backColor new Color32()
let _directMapping = defaultArg directMapping false
*)
-> Palette
- backColor Color32 (Optional)
- Specifies the background color for lookup operations (GetNearestColor, GetNearestColorIndex).
When a lookup is performed with a color with transparency, then the color to be found will be blended with this color before performing the lookup.
The Color32.A field of the background color is ignored. This parameter is optional.
Default value: The default value of the Color32 type, which has the same RGB values as Black. - directMapping Boolean (Optional)
- to map any color directly to an index instead of searching for a nearest color,
which is very fast but may end up in a result of a bit higher contrast than the original image;
to perform a lookup to determine nearest colors, which may be slower but more accurate. This parameter is optional.
Default value: .
PaletteA
Palette instance that uses a 4-bit grayscale palette of 16 shades.