Colors are often defined using RGB notation, such as rgb(10, 100, 255)
.
Create a React component containing three input fields: one for Red
, one for Green
and one forBlue
. Below these controls, render a square whose background color updates in real time based on the values entered.
Intially, the values for each input, should be 0.
Note: Please add aria-label="square"
on the colored square.