Question: create an index.html file and a script.js file. 2. The HTML page must contain a form that allows the user to input a desired
create an index.html file and a script.js file. 2. The HTML page must contain a form that allows the user to input a desired date. Submitting the form should trigger a request to the Color of the Day API. 3. The Fetch API must be used to make the request to the Color of the Day API. The request should include the date provided by the user. Objective Using local storage and the Color of the Day API, create a web application that allows users to search a color by date and manage a record of their searches. Color of the Day API The Color of the Day API will accept a GET request with one attribute, a formatted date (vyyy-am-d). An example request can be found below. http://colors.zoodinkers.com/api?date=2021-04-01 The API will return an object containing a color hex value and the date. An example of the response object can be found below. ":"2021-54-01, ="FOat B9d" | 4. The response from the Color of Day API should be parsed and dynamically added to the page. The elements added to the page should include a color "swatch" displaying the returned color with the returned hex value and the returned date being displayed next to the "swatch". 2 5. Each time the user searches for a color, a record of the search should be stored in a "search history". This search history should be kept persistent across browser sessions using local storage. 6. When the page loads, any search history stored in the local storage should be retrieved and displayed on the page. 7. A button should allow the user to clear the search history both in the web application and in local storage. 8. While you are encouraged to make every project visually appealing, styling for this project is not necessary. The CSS, or lack thereof, will have no impact on your grade. Hints 1. The Color of the Day API will accept any past or future date. 2. The search history can be stored as an array of objects.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
