Step 2. Apply gradient color Adding gradient color to the yellow square, which requires 40 additional lines of code.