Set the brightness of the LEDs, this scales the values that have been set by setPixelColor() and scale them by the percentage used in the parameter.
led.setBrightness(50)
#include <Arduino_APA102.h>
Arduino_APA102 leds(5, 5, 4);
void setup() {
leds.begin();
leds.setPixelColor(0, 0xFFFFFF);
leds.setPixelColor(1, 0xFFFFFF);
leds.show();
delay(1000);
}
void loop() {
leds.setBrightness(50); //Set global brightness
leds.show();
delay(1000);
leds.setBrightness(0, 10); //Change LED 0 's brightness
leds.show();
delay(1000);
}