HOW TO MAKE THREE DIFFERENT ITINERARY LEDS BLINK AT THE SAME TIME?

Hello, I am using arduion uno board. I want to make three LED blink at the same time. Here is the method I found now, and it totally can run.

const byte yellowLED = 11;
const byte greenLED = 12;
const byte redLED = 13;

const unsigned long yellowLEDinterval = 100;
const unsigned long greenLEDinterval = 500;
const unsigned long redLEDinterval = 1000;

unsigned long yellowLEDtimer;
unsigned long greenLEDtimer;
unsigned long redLEDtimer;

void setup ()
{
pinMode (yellowLED, OUTPUT);
pinMode (greenLED, OUTPUT);
pinMode (redLED, OUTPUT);
yellowLEDtimer = millis ();
greenLEDtimer = millis ();
redLEDtimer = millis ();
} // end of setup

void toggleyellowLED ()
{
if (digitalRead (yellowLED) == LOW)
digitalWrite (yellowLED, HIGH);
else
digitalWrite (yellowLED, LOW);

yellowLEDtimer = millis ();
}

void toggleGreenLED ()
{
if (digitalRead (greenLED) == LOW)
digitalWrite (greenLED, HIGH);
else
digitalWrite (greenLED, LOW);

greenLEDtimer = millis ();
}

void toggleRedLED ()
{
if (digitalRead (redLED) == LOW)
digitalWrite (redLED, HIGH);
else
digitalWrite (redLED, LOW);

redLEDtimer = millis ();
}

void loop ()
{
if ( (millis () - yellowLEDtimer) >= yellowLEDinterval)
toggleyellowLED ();

if ( (millis () - greenLEDtimer) >= greenLEDinterval)
toggleGreenLED ();

if ( (millis () - redLEDtimer) >= redLEDinterval)
toggleRedLED ();

}

Then, here is the problem. This method just can make the length of LED "ON" and "OFF" are same. Like yellowLED "ON" for 100 ms, "OFF" for 100 ms; greenLED "ON" for 500 ms, "OFF" for 500 ms; redLED "ON" for 1000 ms, "OFF" for 1000 ms. But I hope the length of each LED "ON" and "OFF" can be different. Like yellowLED "ON" for 100 ms, "OFF" for 80 ms; greenLED "ON" for 500 ms, "OFF" for 300 ms; redLED "ON" for 1000 ms, "OFF" for 800 ms. How should I modify the code ?

Something like this maybe

//blink 3 LEDs, each with different periods on/off - non blocking

const byte ledPins[] = {3, 5, 6};
const byte NUMBER_OF_LEDS = sizeof(ledPins) / sizeof(ledPins[0]);
unsigned long startTimes[NUMBER_OF_LEDS];
unsigned long periods[][NUMBER_OF_LEDS] = { {500, 300, 100}, {500, 200, 450} };  //on, off periods

void setup()
{
  for (int led = 0; led < NUMBER_OF_LEDS; led++)
  {
    pinMode(ledPins[led], OUTPUT);
  }
}

void loop()
{
  unsigned long currentTime = millis();
  for (int led = 0; led < NUMBER_OF_LEDS; led++)
  {
    byte ledState = digitalRead(ledPins[led]);
    if (currentTime - startTimes[led] >= periods[ledState][led])
    {
      digitalWrite(ledPins[led], !ledState);
      startTimes[led] = currentTime;
    }
  }
}

The on/off periods for each LED are held separately in an array and accessed using the LED number and its current state

I am amazed! This beginner gets time calculating right before learning about arrays! Won't be a beginner for too long!