This project is a simple RGB color generator web application that allows you to interactively create and display RGB color codes.
The application provides three sliders for adjusting red, green, and blue color values. Dragging any slider updates the generated RGB color code in real-time, reflected in both the displayed background color of the page and the input field value.
The code utilizes HTML, CSS, and JavaScript to achieve the color generation functionality:
- HTML: Defines the web page structure, including headings, sliders, and an input field to display the color code.
- CSS: Styles the page layout, sliders, and input field for a user-friendly interface.
- JavaScript: Implements the core logic:
- Retrieves slider values when adjusted.
- Generates the RGB color code string based on the slider values.
- Updates the page background color and the input field value with the generated color code.
- Save the code as an HTML file (e.g., rgb_generator.html).
- Open the HTML file in your web browser.
- Drag the sliders to adjust the red, green, and blue color values.
- The generated RGB color code will be displayed in the input field and reflected in the background color.