How to Create Color Picker input box in HTML ? Last Updated : 31 Oct, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article, we will know about the HTML color picker & will understand its implementation through the example. The <input> element of type color in HTML provides the user with an interface to select a color from the default color-picker to interface or design their own color by giving the desired value in the field of RGB. Syntax: <input type="color" value="#228c4e">type: It specifies the type of <input> element to display. The default value is text.value: It specifies the value of the element with which it is used to specify the initial value of the input element.Approach: Declare the <input> tag inside the <body> tag.Use the type attribute with the <input> element.Define the type attribute to value “color”.Example 1: In this example, we will place the default color picker. HTML <!DOCTYPE html> <html> <body style="text-align: center;"> <h1> GeeksforGeeks </h1> <h2> HTML default color Picker: <!-- The default color picker color is black--> <input type="color"> </h2> </body> </html> Output: The default value of the Color Picker is #000000 (Black). The user can specify their own shade of color picker with the help of the value attribute. Example 2: In this example, we will set the default color as green by using the value attribute. HTML <!DOCTYPE html> <html> <body style="text-align: center;"> <h1> GeeksforGeeks </h1> <h2> HTML User's preferred color Picker: <!-- Here we set a fixed color by value attribute--> <input type="color" value="#009900"> </h2> </body> </html> Output: The value of the text in RGB fields can be changed according to convenience anytime and a new color will be generated. Supported Browsers: Google Chrome 20.0Microsoft Edge 14.0Firefox 29.0Opera 12.0Safari 12.1 Comment More infoAdvertise with us Next Article How to create Color Picker in ReactJS ? A antarasinha Follow Improve Article Tags : Technical Scripter Web Technologies HTML Technical Scripter 2020 HTML-Basics +1 More Similar Reads How to create Color Picker in ReactJS ? In this article, we are going to learn how we can create a Color Picker in ReactJs. A color picker is a graphical user interface widget, usually found within graphics software or online, used to select colors and sometimes to create color schemes.Prerequisites:NodeJS or NPMReact JSApproach:To create 2 min read How to add color picker in a form using HTML ? In this article, we will learn how to add a color picker in a form using HTML. As we know, a color picker is also known as a color-chooser. It is an interface in which a user can select a single color from multiple collections of background colors. When we submitted the color, the browser convert it 1 min read How to add Color Picker in NextJS? To add a color picker in Next.js, integrate a third-party library available on npm. This allows users to select colors easily, enhancing the interactivity and user experience of your application. In this article, we are going to learn how we can add a color picker in NextJS.ApproachTo add our color 2 min read HTML DOM Input Color defaultValue Property The DOM Input Color defaultValue Property in HTML DOM is used to set or return the default value of a Color picker. It is the value specified in the value attribute. Syntax: It returns the defaultValue property.colorObject.defaultValueIt is used to set the defaultValue property.colorObject.defaultVa 2 min read How to add color in HTML without CSS ? In HTML, adding color to text and elements is most commonly done using CSS, which provides greater control and cleaner separation of style from structure. However, there are still a few ways to add color directly within HTML, without relying on CSS. These methods are generally considered outdated bu 3 min read How to add color in HTML without CSS ? In HTML, adding color to text and elements is most commonly done using CSS, which provides greater control and cleaner separation of style from structure. However, there are still a few ways to add color directly within HTML, without relying on CSS. These methods are generally considered outdated bu 3 min read Like