Show / Hide Table of Contents

Class HexColorExtension

Extension methods for conversion between color and string

Inheritance
object
HexColorExtension
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Sartorius.SAF.Presentation.Controls
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
public static class HexColorExtension

Methods

View Source

GetColorFromHex(string)

Converts a hexadecimal string to a Color

Declaration
public static Color GetColorFromHex(this string hexString)
Parameters
Type Name Description
string hexString

a hexadecimal string

Returns
Type Description
Color

a color

View Source

GetHexString(IEnumerable<byte>)

Converts a byte array to a hexadecimal string

Declaration
public static string GetHexString(this IEnumerable<byte> data)
Parameters
Type Name Description
IEnumerable<byte> data

the bytearray in form [r, g, b]

Returns
Type Description
string
View Source

GetHexStringFromColor(Color)

Converts a color to a hexadecimal string

Declaration
public static string GetHexStringFromColor(this Color color)
Parameters
Type Name Description
Color color

The color to convert

Returns
Type Description
string

a hexadecimal string

  • View Source
Back to top Generated by DocFX