layout: default title: MapColor parent: Core Classes —

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 Maps SDK for JavaScript

public class MapColor :
System.IEquatable<dymaptic.GeoBlazor.Core.Objects.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

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.Clone() Method

Clones the color object.

public dymaptic.GeoBlazor.Core.Objects.MapColor Clone();

Returns

MapColor

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