Need some help on a sketch for Circuit playground

II just got my self a Circuit playground (Classic) and got hold of a sketch for it that i want to use and all works fine but i want to be able to lower the intense on the led light as it is to intense for what i want it for.
So as i am rely new to all this i rely need help on this.

As i will have it in a miniature fire pit like this one - Miniature Fire pit

The code i will be using is this one that i got here - Jack-o'-Lantern

And here is the code.

#include "Adafruit_CircuitPlayground.h"
 
void setup() {
  CircuitPlayground.begin();
  CircuitPlayground.setBrightness(255); // LEDs full blast!
}
 
uint8_t prev = 128;              // Start brightness in middle
 
void loop() {
  uint8_t lvl = random(64, 192); // End brightness at 128±64
  split(prev, lvl, 32);          // Start subdividing, ±32 at midpoint
  prev = lvl;                    // Assign end brightness to next start
}
 
void split(uint8_t y1, uint8_t y2, uint8_t offset) {
  if(offset) { // Split further into sub-segments w/midpoint at ±offset
    uint8_t mid = (y1 + y2 + 1) / 2 + random(-offset, offset);
    split(y1 , mid, offset / 2); // First segment (offset is halved)
    split(mid, y2 , offset / 2); // Second segment (ditto)
  } else { // No further subdivision - y1 determines LED brightness
    uint32_t c = (((int)(pow((float)y1 / 255.0, 2.7) * 255.0 + 0.5) // Gamma
                 * 0x1004004) >> 8) & 0xFF3F03; // Expand to 32-bit RGB color
    for(uint8_t i=0; i<10; i++) CircuitPlayground.strip.setPixelColor(i, c);
    CircuitPlayground.strip.show();
    delay(4);
  }
}

So i hope some one can help me out on this.

To just lower the maximum brightness you can increase the value of the current limiting resistor of your LEDs. That's the easiest way.

Otherwise you have to decrease the various brightness values (the 128 and 255 mostly) to desired levels.

wvmarle:
To just lower the maximum brightness you can increase the value of the current limiting resistor of your LEDs. That's the easiest way.

Otherwise you have to decrease the various brightness values (the 128 and 255 mostly) to desired levels.

And how do i limiting the resistors? Sorry for the question but is rely new to this.

You do have resistors with your LEDs, don't you?
If not, go add them now or you'll destroy your Arduino. Get a value that gives you the desired maximum brightness, 330 Ohm is a good starting point at 5V and red, green or yellow LEDs.

wvmarle:
You do have resistors with your LEDs, don't you?
If not, go add them now or you'll destroy your Arduino. Get a value that gives you the desired maximum brightness, 330 Ohm is a good starting point at 5V and red, green or yellow LEDs.

I got a Circuit Playground with integrated led´s - Circuit Playground Classic : ID 3000 : $19.95 : Adafruit Industries, Unique & fun DIY electronics and kits

I see, didn't realise that part.

This line looks like a place to start changing values:

 uint8_t lvl = random(64, 192); // End brightness at 128±64