ColorDropdown
ColorDropdown/Index.cshtml
@(Html.Awe().ColorDropdown(new ColorDropdownOpt { Name = "ColorPicker1", AutoSelectFirst = true }))
Custom colors
ColorDropdown/Index.cshtml
@(Html.Awe().ColorDropdown(
new ColorDropdownOpt {
Name = "ColorPicker2",
DataFunc = "customColors",
ClearBtn = true
}))
<script>
function customColors(){
return [{ k: 'green' }, { k: 'purple' }, { k: 'yellow' }, { k: '#2196f3' }, { k: '#ff5722' }];
}
</script>
Comments