# CColor initialization

**URL:** https://discourse.processing.org/t/ccolor-initialization/10632
**Category:** Libraries
**Created:** [April 25, 2019, 4:39pm UTC](https://discourse.processing.org/t/ccolor-initialization/10632 "2019-04-25T16:39:38Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ANDELE](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/andele/32/4818_2.png) [@ANDELE](https://discourse.processing.org/u/ANDELE)
#### Post date: [April 25, 2019, 4:39pm UTC](https://discourse.processing.org/t/ccolor-initialization/10632/1 "2019-04-25T16:39:38Z")

</div>

Hi everyone,  
I have a problem initializing a CColor variable in ControlP5, does anybody know how to do it?

On the library reference I found: _CColor(int cfg, int cbg, int cactive, int ccl, int cvl)_  
**cfg** color foreground  
**cbg** color background  
**cactive** color active  
**ccl** color captionLabel  
**cvl** color valueLabel

**CColor color1 = ???**

I’d like to use:  
.setColor(color1) ;

insted of:  
.setColorForeground(color(0,200,0))  
.setColorBackground(color(0,50,0))  
.setColorActive(color(0,255,0));

Thank you!!

---

<div class="post-metadata">

### Author: ![ANDELE](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/andele/32/4818_2.png) [@ANDELE](https://discourse.processing.org/u/ANDELE)
#### Post date: [April 27, 2019, 8:40am UTC](https://discourse.processing.org/t/ccolor-initialization/10632/3 "2019-04-27T08:40:53Z")

</div>

I’ll try, thank you.
