RGB LED controlled using IR Remote

Read the forum guidelines to see how to post code.
Use the IDE autoformat tool (ctrl-t or Tools, Auto Format) to indent the code for readability before posting code.

The IRremote library (available through the IDE library manager) has example code to show how to use it. Beware of code for the IRremote library on the net. It is likely written for an older version of the library and may not work right.

What type of RGB LED are you using? Is there a data sheet or something that shows its pinout? The same question for the IR detector/decoder.