Color
<div class="form-group"> <label asp-for="Value" class="col-xs-12 control-label"></label> <div class="col-xs-12"> <input asp-for="Value" class="form-control" /> <span asp-validation-for="Value" class="text-danger"></span> </div> </div>
public class ColorExample { [DataType("Color")] public string Value { get; set; } }
public IActionResult Color() { return View(new ColorExample { Value = "#cccccc" }); }