Note: Advice in this article will only work for DotNetBrowser 1.
See the corresponding article for DotNetBrowser 2 here.

DotNetBrowser 1.14 or later supports HTML Input element with type=color.

Both WinFormsBrowserView and WPFBrowserView display the default color chooser dialog where user can select the required color. 

You can override this default behavior by registering your own DialogHandler implementation with overridden OnColorChooser() method where you can set the required color programmatically without displaying any UI dialogs. The following code demonstrates how to do this:


using System;
using System.Drawing;
using System.Windows.Forms;
using DotNetBrowser;
using DotNetBrowser.WinForms;

namespace ColorChooserSample
    class Program
        public class WindowMain : Form
            private WinFormsBrowserView browserView;

            public WindowMain()
                Browser browser = BrowserFactory.Create();
                browserView = new WinFormsBrowserView(browser);

                browser.DialogHandler = new DefaultDialogHandler(browserView);


                Width = 1024;
                Height = 768;
                this.Load += WindowMain_Loaded;

            internal class DefaultDialogHandler : WinFormsDefaultDialogHandler
                public DefaultDialogHandler(Control view) : base(view)

                public override CloseStatus OnColorChooser(ColorChooserParams parameters)
                    parameters.Color = Color.Blue;
                    return CloseStatus.OK;

            void WindowMain_Loaded(object sender, EventArgs e)
                browserView.Browser.LoadHTML("<html><body><input type='color' value='#ff0000'></body></html>");

            public static void Main()
                WindowMain wnd = new WindowMain();

                var browser = wnd.browserView.Browser;


Imports System.Drawing
Imports System.Windows.Forms
Imports DotNetBrowser
Imports DotNetBrowser.WinForms

Module Module1
    Public Class WindowMain
        Inherits Form

        Public Dim browserView As WinFormsBrowserView

        Public Sub New()

            Dim browser As Browser = BrowserFactory.Create()
            browserView = New WinFormsBrowserView(browser)
            browserView.Dock = DockStyle.Fill

            browser.DialogHandler = New DefaultDialogHandler(browserView)


            Width = 1024
            Height = 768
            AddHandler Me.Load, AddressOf WindowMain_Loaded
        End Sub

        Private Sub WindowMain_Loaded(sender As Object, e As EventArgs)
            browserView.Browser.LoadHTML("<html><body><input type='color' value='#ff0000'></body></html>")
        End Sub

        Friend Class DefaultDialogHandler
            Inherits WinFormsDefaultDialogHandler

            Public Sub New(view As Control)
            End Sub

            Public Overrides Function OnColorChooser(ByVal parameters As ColorChooserParams) As CloseStatus
                parameters.Color = Color.Blue
                Return CloseStatus.OK
            End Function
        End Class
    End Class

    Sub Main()
        Dim wnd As WindowMain = New WindowMain()

        Dim browser = wnd.browserView.Browser
    End Sub
End Module