Constructors
ColorHSL
#Initializes a new instance of the ColorHSL class with converted HSL values from a Color
Parameters:
| color (Color) | RGB color to convert to HSL |
Properties
Methods
Distance
#Calculates the 'distance' of two HSL colors
Remarks: This is useful for comparing two different color values to determine if they are similar. The HSL comparison algorithm, while not essentially accurate, gives a good representation of like-colours to the human eye. This method of calculating distance is preferred over the other methods (RGB, CMYK, HSB)
Returns: The overall distance/difference between the two colours. A lower value indicates a closer match
Equals
#Compares the given object for equality with this object
Parameters:
| other (ColorHSL) | Object to compare with |
Returns: True if the object is equal to this instance, false otherwise
Equals
#Compares the given object for equality with this object
Parameters:
| obj (object) | Object to compare with |
Returns: True if the object is equal to this instance, false otherwise
Overrides: ValueType.Equals
GetHashCode
#Gets the hash code for this object
Returns: Hash code for this object
Overrides: ValueType.GetHashCode