# ColorConverter class

Namespace: [Eto.Drawing](https://eto.picoe.ca/api/namespace/eto.drawing.md) · Assembly: [Eto](https://eto.picoe.ca/api/assembly/eto.md)

```cs
public class ColorConverter : TypeConverter
```

> **Obsolete:** Since 2.5. Use TypeDescriptor.GetConverter instead

Converts instances of other types to and from a [Color](https://eto.picoe.ca/api/type/eto.drawing.color.md).

**Remarks:** This only supports converting from a string supported by the [Color.TryParse(string, Color)](https://eto.picoe.ca/api/type/eto.drawing.color/tryparse.md) method. When converting to a string, it converts to a Hex format via [Color.ToHex(bool)](https://eto.picoe.ca/api/type/eto.drawing.color/tohex.md)

## Methods

- [CanConvertFrom](https://eto.picoe.ca/api/type/eto.drawing.colorconverter/canconvertfrom.md): Determines if this can convert a value with the type of `sourceType` to a [Color](https://eto.picoe.ca/api/type/eto.drawing.color.md)
- [CanConvertTo](https://eto.picoe.ca/api/type/eto.drawing.colorconverter/canconvertto.md): Determines if this can convert a [Color](https://eto.picoe.ca/api/type/eto.drawing.color.md) to the `destinationType`
- [ConvertFrom](https://eto.picoe.ca/api/type/eto.drawing.colorconverter/convertfrom.md): Converts the `value` to an instance of a [Color](https://eto.picoe.ca/api/type/eto.drawing.color.md)
- [ConvertTo](https://eto.picoe.ca/api/type/eto.drawing.colorconverter/convertto.md): Converts a [Color](https://eto.picoe.ca/api/type/eto.drawing.color.md) instance to the specified `destinationType`

## Inherited Members

- From [TypeConverter](https://eto.picoe.ca/api/type/eto.typeconverter.md): [CanConvertFrom](https://eto.picoe.ca/api/type/eto.typeconverter/canconvertfrom.md), [CanConvertTo](https://eto.picoe.ca/api/type/eto.typeconverter/canconvertto.md), [ConvertFrom](https://eto.picoe.ca/api/type/eto.typeconverter/convertfrom.md), [ConvertFromInvariantString](https://eto.picoe.ca/api/type/eto.typeconverter/convertfrominvariantstring.md), [ConvertFromString](https://eto.picoe.ca/api/type/eto.typeconverter/convertfromstring.md), [ConvertTo](https://eto.picoe.ca/api/type/eto.typeconverter/convertto.md), [ConvertToInvariantString](https://eto.picoe.ca/api/type/eto.typeconverter/converttoinvariantstring.md), [ConvertToString](https://eto.picoe.ca/api/type/eto.typeconverter/converttostring.md), [GetConvertFromException](https://eto.picoe.ca/api/type/eto.typeconverter/getconvertfromexception.md), [GetConvertToException](https://eto.picoe.ca/api/type/eto.typeconverter/getconverttoexception.md), [IsValid](https://eto.picoe.ca/api/type/eto.typeconverter/isvalid.md)
