ESP32-S3: RGB LED
The S3 DevKitC-1’s own RGB LED (GPIO48) through the colours with rgbLedWrite().

The code
// ESP32-S3 DevKitC-1: its own RGB LED (GPIO48) through the colours with rgbLedWrite().
const uint8_t colours[][3] = {{255, 0, 0}, {255, 120, 0}, {0, 255, 0}, {0, 120, 255}, {160, 0, 255}};
void setup() {
Serial.begin(115200);
Serial.printf("%s at %lu MHz, %d cores\n", ESP.getChipModel(), getCpuFrequencyMhz(), ESP.getChipCores());
}
void loop() {
for (auto &c : colours) {
rgbLedWrite(RGB_BUILTIN, c[0], c[1], c[2]);
delay(400);
}
}
More like this

ESP32-C3: button and RGB LED
A button on GPIO 4 steps the C3 DevKitM-1’s RGB LED through colours.
ArduinoESP32-C3 DevKitM-1

ESP32: blink and fade
The blue LED on GPIO 2 blinks; an LED on GPIO 4 fades with LEDC PWM.
ArduinoESP32 DevKit V1

Web switch on a hotspot
The ESP32 starts its own Wi-Fi (softAP) and serves a page with ON and OFF buttons for an LED. Join it from the phone.
ArduinoESP32 DevKit V1