# Data Type Q

**URL:** https://forum.kirupa.com/t/data-type-q/258603
**Category:** flash
**Created:** [April 25, 2008, 4:08pm UTC](https://forum.kirupa.com/t/data-type-q/258603 "2008-04-25T16:08:56Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Digitalosophy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/digitalosophy/32/1114_2.png) [@Digitalosophy](https://forum.kirupa.com/u/Digitalosophy)
#### Post date: [April 25, 2008, 4:08pm UTC](https://forum.kirupa.com/t/data-type-q/258603/1 "2008-04-25T16:08:56Z")

</div>

Wondering what the data type should be for a a variable when you want to make it’s value a color. (Color… duh) but… Here’s what happens.

```auto

var buttonBorderColor:Color = "0xc21F0C";

```

I get the compile error of found string where color is required. - Obviously because I’m setting the value to a string.

Now…

```auto

var buttonBorderColor:Color = 0xc21F0C;

```

I get the compile error of found Number where color is required.

Of course I can just remove the data type and make this work but just for my own knowledge I’d like to know what the correct data type should be.

Thanks guys 🙂
