colors (ctor)

This commit is contained in:
2017-02-12 03:53:33 +01:00
parent 44c26d099a
commit b3283e4fd4
31 changed files with 12631 additions and 6932 deletions

View File

@ -0,0 +1,15 @@
using System;
using Microsoft.AspNet.Mvc.Rendering;
using Yavsc.Models.Drawing;
namespace Yavsc.Helpers
{
public static class HtmlHelpers
{
public static HtmlString Color(this Color c)
{
if (c==null) return new HtmlString("#000");
return new HtmlString(String.Format("#{0:X2}{1:X2}{2:X2}", c.Red, c.Green, c.Blue));
}
}
}