dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Objects

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 JS API

public class MapColor :
System.IEquatable<dymaptic.GeoBlazor.Core.Objects.MapColor>

Inheritance System.Object 🡒 MapColor

Implements System.IEquatable<MapColor>

Constructors

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

System.String

MapColor.Values Property

The numeric values for calculating a color (rgb/rgba).

public System.Collections.Generic.List<double> Values { get; set; }

Property Value

System.Collections.Generic.List<System.Double>

Methods

MapColor.Equals(object) Method

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj);

Parameters

obj System.Object

The object to compare with the current object.

Returns

System.Boolean
true if the specified object is equal to the current object; otherwise, false.

MapColor.GetHashCode() Method

Serves as the default hash function.

public override int GetHashCode();

Returns

System.Int32
A hash code for the current object.

Operators

MapColor.operator ==(MapColor, MapColor) Operator

Compares two MapColor objects for equality.

public static bool operator ==(dymaptic.GeoBlazor.Core.Objects.MapColor? left, dymaptic.GeoBlazor.Core.Objects.MapColor? right);

Parameters

left MapColor

right MapColor

Returns

System.Boolean

MapColor.operator !=(MapColor, MapColor) Operator

Compares two MapColor objects for inequality.

public static bool operator !=(dymaptic.GeoBlazor.Core.Objects.MapColor? left, dymaptic.GeoBlazor.Core.Objects.MapColor? right);

Parameters

left MapColor

right MapColor

Returns

System.Boolean