This is a very bad thing to do. Never connect a led across a power supply always have something to limit the current. There are power supply's designed to drive LEDs with built in current control but you do not have that. You may have damaged the LEDs, maybe not depending on the color and the supply. I highly recommend you do a few tutorials on Ohm's law, that should help you under current and its control. You will learn that when items are in series there current is the same. Then do a few on LEDs, there you will learn about forward voltage and how each color has a different forward voltage. This should help.
Gil's Crispy Critter Rules, they apply to processor hardware:
Rule #1. A Power Supply the Arduino is NOT!
Rule #2. Never Connect Anything Inductive to an Arduino!
Rule #3 Don't connecting or disconnecting wires with power on.
Rule #4 Do not apply power to any pin unless you know what you are doing.
LaryD's Corollary's
Coro #1 when first starting out, add a 220R resistor in series with both Input and Output pins.
Coro #2 buy a DMM (Digital Multi-meter) to measure voltages, currents and resistance. Violating these rules tends to make crispy critters out of Arduinos.
Hint: It is best to keep the wires under 25cm/10" for good performance.
This is a very bad thing to do. Never connect a led across a power supply always have something to limit the current. There are power supply's designed to drive LEDs with built in current control but you do not have that. You may have damaged the LEDs, maybe not depending on the color and the supply. I highly recommend you do a few tutorials on Ohm's law, that should help you under current and its control. You will learn that when items are in series there current is the same. Then do a few on LEDs, there you will learn about forward voltage and how each color has a different forward voltage. This should help.
Gil's Crispy Critter Rules, they apply to processor hardware:
Rule #1. A Power Supply the Arduino is NOT!
Rule #2. Never Connect Anything Inductive to an Arduino!
Rule #3 Don't connecting or disconnecting wires with power on.
Rule #4 Do not apply power to any pin unless you know what you are doing.
LaryD's Corollary's
Coro #1 when first starting out, add a 220R resistor in series with both Input and Output pins.
Coro #2 buy a DMM (Digital Multi-meter) to measure voltages, currents and resistance. Violating these rules tends to make crispy critters out of Arduinos.
Hint: It is best to keep the wires under 25cm/10" for good performance.
Since the supply voltage is very close to the forward voltage, the current will be highly sensitive to the actual values....
Say the forward voltage of your led happens to be 3.2V. Say your supply voltage happens to be 3.2V. See what happens???
Let's assume for the moment your supply is exactly 3.3V, the forward voltage of your white LEDs is 3.2V, 2.2V for the red LEDs and your resistor values are exactly 12R and 62R. These things won't be exact in reality.
The current flowing through each 12R resistor will be (3.3-3.2)/12 = 8.3mA. This same current must flow through the led also, of course. For 8 of these LEDs, that's 66mA, very close to what you measured.
The current flowing through each 62R resistor will be (3.3-2.2)/62 = 16.1mA. This same current must flow through the led also, of course. For 6 of these LEDs, that's 96mA, reasonably close to what you measured.
So the answer to your question is: because of the values of the components you used and because of the maths!
This does not specify that the LED will draw exactly 20 mA, in either case. It simply specifies that one should not exceed 20 mA through the device. To know how much current is flowing in the device, you need to provide a series resistance, as you seem to have done, and know the approximate voltage across the LED, in order to calculate the residual voltage that must appear across the resistor. Then, you can choose a resistor by calculating Vr/Id, where Vr is the residual voltage to be dropped across the resistor, and Id, the desired current through the LED.
Wiring multiple LEDs in parallel without any intervening resistance is generally bad, because the LEDs have a Vforward that is approximate for any given current. In a parallel arrangement, typically one LED will have a slightly lower Vf, and therefore will pass more than it's share of the current. In extremis, it will self-destruct, but usually it will just fail first, sometime down the road; when that happens, the remaining LEDs will share the full current, which will push another LED into danger, then it will fail, ultimately killing them all, slowly.
This is why for LED strings, you'll see several LEDs in series with one resistor, and that pattern will repeat down the string.
Please,in turn, indicate who you are addressing. I did, and my post is relevant to your described situation, UNLESS you intended to state that EACH LED had a resistor, which you did not. This is why we ask for schematics, even for simple circuits. Words are inadequate.