# Global variables col\[\] and colT\[\]

**URL:** <https://wled.discourse.group/t/global-variables-col-and-colt/153>\
**Category:** Issues\
**Created:** [February 24, 2020, 12:55pm UTC](https://wled.discourse.group/t/global-variables-col-and-colt/153 "2020-02-24T12:55:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Def3nder](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/def3nder/32/62_2.png) [@Def3nder](https://wled.discourse.group/u/Def3nder)\
**Post date:** [February 24, 2020, 12:55pm UTC](https://wled.discourse.group/t/global-variables-col-and-colt/153/1 "2020-02-24T12:55:17Z")

</div>

Hi @Aircoookie,

I just struggle about the correct “description” for the arrays `col` and `colT` .

wled00.ino defines them as:

```
byte col[] {255, 160, 0, 0}; //default RGB(W) color
byte colT[] {0, 0, 0, 0}; //current color

```

…but when looking at “the rest of the code”, `col[]` is used to change the primary color.

Could it be that the descriptions are swapped ?

```
col[] = primary color
colT[] = default primary

```

Sorry, but I’m kind of confused 🙂

---

<div class="post-metadata">

**Author:** ![Aircoookie](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/aircoookie/32/2_2.png) [@Aircoookie](https://wled.discourse.group/u/Aircoookie)\
**Post date:** [February 24, 2020, 1:15pm UTC](https://wled.discourse.group/t/global-variables-col-and-colt/153/2 "2020-02-24T13:15:54Z")

</div>

Hi @Def3nder,

indeed the comments for theses arrays are misleading. This was probably an oversight on my side from more than 2 years ago when these arrays served different purposes. Or `col` is referred to as “default” because you can change the default boot color by changing the RGB values.

They actually work like this:

- `col` is the current primary color. It is the one that should be updated if you want to change the color.
- `colT` is the primary color that is currently displayed on the LEDs

Normally, these have the same value, with the exception of a running color transition, where `col` is the target color you want to arrive at and `colT` being the temporary color the LEDs are set to in that moment.

I will change the comment description of the arrays to clarify this 🙂

---

<div class="post-metadata">

**Author:** ![Def3nder](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/def3nder/32/62_2.png) [@Def3nder](https://wled.discourse.group/u/Def3nder)\
**Post date:** [February 24, 2020, 2:55pm UTC](https://wled.discourse.group/t/global-variables-col-and-colt/153/3 "2020-02-24T14:55:29Z")

</div>

thx a lot - that helped to “un-confuse” me again 😃
