Show / Hide Table of Contents

# Class HexColorConverter

A converter for UnityEngine.Color objects.

##### Inheritance

Object
ValueConverter<UnityEngine.Color>
HexColorConverter

##### Implements

IValueConverter

##### Inherited Members

ValueConverter<Color>.IValueConverter.ToValue(Object, Object)
ValueConverter<Color>.IValueConverter.FromValue(Value, Object)
ValueConverter<Color>.IValueConverter.Type
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()

###### Namespace: IPA.Config.Stores.Converters

###### Assembly: IPA.Loader.dll

##### Syntax

    public sealed class HexColorConverter : ValueConverter<Color>, IValueConverter

### Methods

| Improve this Doc View Source

#### FromValue(Value, Object)

Converts a Value that is a Text node to the corresponding UnityEngine.Color object.

##### Declaration

    public override Color FromValue(Value value, object parent)

##### Parameters

Type | Name | Description
--- | --- | ---
Value | value | the Value to convert
Object | parent | the object which will own the created object

##### Returns

Type | Description
--- | ---
UnityEngine.Color | the deserialized Color object

##### Overrides

IPA.Config.Stores.ValueConverter<UnityEngine.Color>.FromValue(IPA.Config.Data.Value, System.Object)

##### Exceptions

Type | Condition
--- | ---
ArgumentException | if `value` is not a Text node or couldn't be parsed into a Color object

| Improve this Doc View Source

#### ToValue(Color, Object)

Converts color of type UnityEngine.Color to a Value node.

##### Declaration

    public override Value ToValue(Color obj, object parent)

##### Parameters

Type | Name | Description
--- | --- | ---
UnityEngine.Color | obj | the object to serialize
Object | parent | the object which owns `obj`

##### Returns

Type | Description
--- | ---
Value | a Text node representing `obj`

##### Overrides

IPA.Config.Stores.ValueConverter<UnityEngine.Color>.ToValue(UnityEngine.Color, System.Object)

### Implements

IValueConverter

### Extension Methods

ReflectionUtil.SetField<T, U>(T, String, U)
ReflectionUtil.GetField<U, T>(T, String)
ReflectionUtil.SetProperty<T, U>(T, String, U)
ReflectionUtil.GetProperty<U, T>(T, String)
ReflectionUtil.InvokeMethod<U, T>(T, String, Object[])