dymaptic.GeoBlazor.Core
dymaptic.GeoBlazor.Core.Model
MapColor Class
Creates a new color object by passing either a hex, rgb(a), hsl(a) or named color value. Hex, hsl(a) and named color values can be passed as a string: ArcGIS Maps SDK for JavaScript
public class MapColor :
System.IEquatable<dymaptic.GeoBlazor.Core.Model.MapColor>
Inheritance System.Object 🡒 MapColor
Implements System.IEquatable<MapColor>
Constructors
MapColor() Constructor
Parameterless constructor for Protobuf deserialization.
Not intended for public use.
public MapColor();
MapColor(double[]) Constructor
Creates a new color with a collection of numeric values in rgb or rgba format.
public MapColor(params double[] values);
Parameters
values
System.Double[]
Requires 3 or 4 values, in the order R(0-255), G(0-255), B(0-255), A(0-1). A is optional.
MapColor(string) Constructor
Creates a new color with a common color name, or a hex value starting with the # sign.
public MapColor(string hexOrNameValue);
Parameters
hexOrNameValue
System.String
The value of the hex or name.
Properties
MapColor.HexOrNameValue Property
The name or hex value of the color.
public string? HexOrNameValue { get; set; }
Property Value
MapColor.RgbaValues Property
The numeric values for calculating a color (rgb/rgba).
public double[]? RgbaValues { get; set; }
Property Value
Methods
MapColor.BlendColors(MapColor, MapColor, double) Method
Creates a Color instance by blending two colors using a weight factor.
public static dymaptic.GeoBlazor.Core.Model.MapColor? BlendColors(dymaptic.GeoBlazor.Core.Model.MapColor start, dymaptic.GeoBlazor.Core.Model.MapColor end, double weight);
Parameters
start
MapColor
The start color.
end
MapColor
The end color.
weight
System.Double
The weight factor. 0 means the start color, 1 means the end color, 0.5 means a 50/50 blend.
Returns
MapColor
A new color instance representing the blended color, or null if the colors could not be blended.
MapColor.Clone() Method
Clones the color object.
public dymaptic.GeoBlazor.Core.Model.MapColor Clone();
Returns
MapColor.Equals(MapColor) Method
public bool Equals(dymaptic.GeoBlazor.Core.Model.MapColor? other);
Parameters
other
MapColor
Returns
MapColor.Equals(object) Method
public override bool Equals(object? obj);
Parameters
obj
System.Object
Returns
MapColor.GetHashCode() Method
public override int GetHashCode();
Returns
MapColor.ToCss() Method
Returns a CSS color string in rgba form representing the Color instance.
ArcGIS Maps SDK for JavaScript
public string? ToCss();
Returns
MapColor.ToHex() Method
Returns the color in hexadecimal format.
ArcGIS Maps SDK for JavaScript
public string? ToHex();
Returns
MapColor.ToSystemColor() Method
Returns a System.Drawing.Color instance representing the Color instance.
public System.Nullable<System.Drawing.Color> ToSystemColor();
Returns
System.Nullable<System.Drawing.Color>
Operators
MapColor.operator ==(MapColor, MapColor) Operator
Compares two MapColor objects for equality.
public static bool operator ==(dymaptic.GeoBlazor.Core.Model.MapColor? left, dymaptic.GeoBlazor.Core.Model.MapColor? right);
Parameters
left
MapColor
right
MapColor
Returns
MapColor.operator !=(MapColor, MapColor) Operator
Compares two MapColor objects for inequality.
public static bool operator !=(dymaptic.GeoBlazor.Core.Model.MapColor? left, dymaptic.GeoBlazor.Core.Model.MapColor? right);
Parameters
left
MapColor
right
MapColor