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 A antarasinha Follow Improve Article Tags : Technical Scripter Web Technologies HTML Technical Scripter 2020 HTML-Basics +1 More Similar Reads Non-linear Components In electrical circuits, Non-linear Components are electronic devices that need an external power source to operate actively. Non-Linear Components are those that are changed with respect to the voltage and current. Elements that do not follow ohm's law are called Non-linear Components. Non-linear Co 11 min read JavaScript Tutorial JavaScript is a programming language used to create dynamic content for websites. It is a lightweight, cross-platform, and single-threaded programming language. It's an interpreted language that executes code line by line, providing more flexibility.JavaScript on Client Side: On the client side, Jav 11 min read Web Development Web development is the process of creating, building, and maintaining websites and web applications. It involves everything from web design to programming and database management. Web development is generally divided into three core areas: Frontend Development, Backend Development, and Full Stack De 5 min read Spring Boot Tutorial Spring Boot is a Java framework that makes it easier to create and run Java applications. It simplifies the configuration and setup process, allowing developers to focus more on writing code for their applications. This Spring Boot Tutorial is a comprehensive guide that covers both basic and advance 10 min read HTML Tutorial HTML stands for HyperText Markup Language. It is the standard language used to create and structure content on the web. It tells the web browser how to display text, links, images, and other forms of multimedia on a webpage. HTML sets up the basic structure of a website, and then CSS and JavaScript 11 min read React Interview Questions and Answers React is an efficient, flexible, and open-source JavaScript library that allows developers to create simple, fast, and scalable web applications. Jordan Walke, a software engineer who was working for Facebook, created React. Developers with a JavaScript background can easily develop web applications 15+ min read React Tutorial React is a powerful JavaScript library for building fast, scalable front-end applications. Created by Facebook, it's known for its component-based structure, single-page applications (SPAs), and virtual DOM,enabling efficient UI updates and a seamless user experience.Note: The latest stable version 7 min read JavaScript Interview Questions and Answers JavaScript is the most used programming language for developing websites, web servers, mobile applications, and many other platforms. In Both Front-end and Back-end Interviews, JavaScript was asked, and its difficulty depends upon the on your profile and company. Here, we compiled 70+ JS Interview q 15+ min read Class Diagram | Unified Modeling Language (UML) A UML class diagram is a visual tool that represents the structure of a system by showing its classes, attributes, methods, and the relationships between them. It helps everyone involved in a projectâlike developers and designersâunderstand how the system is organized and how its components interact 12 min read Backpropagation in Neural Network Back Propagation is also known as "Backward Propagation of Errors" is a method used to train neural network . Its goal is to reduce the difference between the modelâs predicted output and the actual output by adjusting the weights and biases in the network.It works iteratively to adjust weights and 9 min read Like