public void ConvertFrom()
    {
        var converter = new InterlockColorConverter();

        ConvertFromStringAndAssert(converter, "Aqua", InterlockColor.Aqua);
        ConvertFromStringAndAssert(converter, "Aqua ", InterlockColor.Aqua);
        ConvertFromStringAndAssert(converter, "aqua", InterlockColor.Aqua);
        ConvertFromStringAndAssert(converter, "#00ffff", InterlockColor.Aqua);
        ConvertFromStringAndAssert(converter, "#00ffff80", InterlockColor.Aqua.WithA(128));
        ConvertFromStringAndAssert(converter, "#00ffFF", InterlockColor.Aqua);
        ConvertFromStringAndAssert(converter, "#00ffff  ", InterlockColor.Aqua);
        ConvertFromStringAndAssert(converter, "SlateGray", InterlockColor.SlateGray);
        ConvertFromStringAndAssert(converter, "slategray", InterlockColor.SlateGray);
        ConvertFromStringAndAssert(converter, "slateGray", InterlockColor.SlateGray);
        ConvertFromStringAndAssert(converter, "SLATEGRAY", InterlockColor.SlateGray);
        ConvertFromStringAndAssert(converter, "#00QQff", InterlockColor.Transparent);
        ConvertFromStringAndAssert(converter, "Transparent", InterlockColor.Transparent);
        ConvertFromStringAndAssert(converter, "#FFFFFF00", InterlockColor.Transparent);
        ConvertFromStringAndAssert(converter, "Zany", InterlockColor.Transparent);
        ConvertFromStringAndAssert(converter, string.Empty, InterlockColor.Transparent);
        ConvertFromStringAndAssert(converter, "#010203", new InterlockColor(1, 2, 3));
        ConvertFromStringAndAssert(converter, "#01020300", new InterlockColor(1, 2, 3, a: 0));
        ConvertFromStringAndAssert(converter, "#01020380", new InterlockColor(1, 2, 3, a: 128));
        ConvertFromStringAndAssert(converter, "#010203", InterlockColor.From(0x010203FF));
        ConvertFromStringAndAssert(converter, "#010203FF", InterlockColor.From(0x010203FF));
        ConvertFromStringAndAssert(converter, "#01020300", InterlockColor.From(0x01020300));
        ConvertFromStringAndAssert(converter, "#01020380", InterlockColor.From(0x01020380));
        Assert.AreEqual(InterlockColor.Transparent, InterlockColor.FromText(null));
    }
 private static void ConvertFromStringAndAssert(InterlockColorConverter converter, string colorValue, InterlockColor expectedColor)
 {
     Assert.AreEqual(expectedColor, (InterlockColor)converter.ConvertFrom(null, CultureInfo.InvariantCulture, colorValue));
     Assert.AreEqual(expectedColor, InterlockColor.FromText(colorValue));
 }