# Color Array Parameters SDK

**URL:** <https://forum.inductiveautomation.com/t/color-array-parameters-sdk/9852>\
**Category:** 3rd Party Modules\
**Created:** [March 27, 2015, 8:04pm UTC](https://forum.inductiveautomation.com/t/color-array-parameters-sdk/9852 "2015-03-27T20:04:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adnaram](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@adnaram](https://forum.inductiveautomation.com/u/adnaram)\
**Post date:** [March 27, 2015, 8:04pm UTC](https://forum.inductiveautomation.com/t/color-array-parameters-sdk/9852/1 "2015-03-27T20:04:11Z")

</div>

Hello, i want to add a “Color Array” parameter inside my component. I didn’t know wich type of variable I need to declare in my java class. By exemple, their is a Color Array parameter in the Pie Chart object of Ignition Designer.

I’m adding the parameter with :  
Code:  
public [Type of Variable] Data;  
getData()  
setData(…)

…  
addProp(“data”, “Data”, “”, CAT\_DATA); //into CommonBeanInfo

Thanks !

---

<div class="post-metadata">

**Author:** ![glogue](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@glogue](https://forum.inductiveautomation.com/u/glogue)\
**Post date:** [March 30, 2015, 7:43pm UTC](https://forum.inductiveautomation.com/t/color-array-parameters-sdk/9852/2 "2015-03-30T19:43:39Z")

</div>

Putting the following code on mouseClicked for a Button in the same Root Container as the Pie Chart prints out the following in the console.

```auto
object = event.source.parent.getComponent('Pie Chart')
print object.getSectionColors()
```

array(java.awt.Color, [java.awt.Color[r=255,g=85,b=85], java.awt.Color[r=85,g=85,b=255], java.awt.Color[r=85,g=255,b=85], java.awt.Color[r=255,g=85,b=255], java.awt.Color[r=85,g=255,b=255], java.awt.Color[r=255,g=175,b=175], java.awt.Color[r=128,g=128,b=128]])

The datatype for this is ‘array.array’

---

<div class="post-metadata">

**Author:** ![ssmith](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@ssmith](https://forum.inductiveautomation.com/u/ssmith)\
**Post date:** [March 30, 2015, 7:56pm UTC](https://forum.inductiveautomation.com/t/color-array-parameters-sdk/9852/3 "2015-03-30T19:56:23Z")

</div>

The datatype you’re looking for is exactly what it appears to be, an array of colors.

```auto
private Color [] myArrayOfColorsProperty;
```

Square brackets signify that it’s an array. For more on arrays:[https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html](https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html).
