# Connected data not found for setting color

**URL:** <https://forum.builder.io/t/connected-data-not-found-for-setting-color/2554>\
**Category:** Visual Editor Help\
**Created:** [September 2, 2022, 3:48pm UTC](https://forum.builder.io/t/connected-data-not-found-for-setting-color/2554 "2022-09-02T15:48:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gkappel](https://avatars.discourse-cdn.com/v4/letter/g/58956e/32.png) [@gkappel](https://forum.builder.io/u/gkappel)\
**Post date:** [September 2, 2022, 3:48pm UTC](https://forum.builder.io/t/connected-data-not-found-for-setting-color/2554/1 "2022-09-02T15:48:32Z")

</div>

_Please fill out as many of the following questions as possible so we can help you promptly! If you don’t know how to answer or it does not apply, feel free to remove it or leave it blank._

**Builder content link**

> **[Builder.io: Drag and drop Visual CMS](https://builder.io/content/eb9d740a46d849688aaf55934e67cf06/edit?activeDesignerTab=3&selectedBlock=builder-514ab4843eef4d87858ca3614c0e24d3)**
>
> Build and optimize digital experiences for any tech stack, visually.

**Builder public api key**  
79a2beca42894ade92dce05f54bd8f79

**What are you trying to accomplish**  
set color from model data, see [Use Data Models to create a color palette or swatches for your content](https://forum.builder.io/t/use-data-models-to-create-a-color-palette-or-swatches-for-your-content/2265)

**Screenshots or video link**

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/f/f8cb3f4d4dd612fd38657f8311e56fe74c4ec9e2.jpeg)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/5/58082f1af3e27ce4ec7fd87ed18e726f46ee72aa.jpeg)

**Code stack you are integrating Builder with**  
html/web components

---

<div class="post-metadata">

**Author:** ![logan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/logan/32/5564_2.png) [@logan](https://forum.builder.io/u/logan)\
**Post date:** [September 2, 2022, 5:50pm UTC](https://forum.builder.io/t/connected-data-not-found-for-setting-color/2554/2 "2022-09-02T17:50:04Z")

</div>

Hey @gkappel, thanks for getting this reported! Could you show a screenshot of your Content State expanded like this?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/6/6ee05e47ee01c5a78856b70c985140890cee39c4.jpeg)

---

<div class="post-metadata">

**Author:** ![gkappel](https://avatars.discourse-cdn.com/v4/letter/g/58956e/32.png) [@gkappel](https://forum.builder.io/u/gkappel)\
**Post date:** [September 2, 2022, 6:19pm UTC](https://forum.builder.io/t/connected-data-not-found-for-setting-color/2554/3 "2022-09-02T18:19:53Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/1/19b553439ea240b2992e21b1134b87747264726b.jpeg)

---

<div class="post-metadata">

**Author:** ![logan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/logan/32/5564_2.png) [@logan](https://forum.builder.io/u/logan)\
**Post date:** [September 6, 2022, 1:52pm UTC](https://forum.builder.io/t/connected-data-not-found-for-setting-color/2554/4 "2022-09-06T13:52:54Z")

</div>

Ah, thanks for showing that, @gkappel. Your state object can sometimes appear empty in Builder, and we’re working on improving that behavior.

In the meantime, there’s an alternative way to connect your model information to your Builder project. Head to your color model settings and scroll down to the bottom. Switch to the REST API and copy the `https://cdn.builder` URL.

Then, on your page, create a new API Data Source:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/f/f9aa6a53ba805b175f40047cbb594de285a51659.png)

Ideally, this will give you your State object back and show the colors there.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/9/92814794676304a4757f130d0229e122137279ff.png)

If this still isn’t working, you can still show your state object / use JS syntax to select your colors.

Here I have a text box placed on my page with a data binding of `text` to `JSON.stringify(state)`, which allows you to see your state object. I’ve bound the background color of some other text to the orange color in my palette using `state.colors.results[0].data.color` :

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/3/3716e6110eac77dc3dfcb140ff22dab01306d8fd.png)

---

<div class="post-metadata">

**Author:** ![gkappel](https://avatars.discourse-cdn.com/v4/letter/g/58956e/32.png) [@gkappel](https://forum.builder.io/u/gkappel)\
**Post date:** [September 6, 2022, 2:49pm UTC](https://forum.builder.io/t/connected-data-not-found-for-setting-color/2554/5 "2022-09-06T14:49:54Z")

</div>

I added an API data source as you instructed, that did not help with the empty state{} i the visual builder

I am able to bind the color to a data source or api in code as you indicated, but we are primarily evaluating [builder.io](http://builder.io) for use by our marketing staff, if even the tutorials on the site do not work as indicated and you need to drop down to code workarounds that is concerning

---

<div class="post-metadata">

**Author:** ![logan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/logan/32/5564_2.png) [@logan](https://forum.builder.io/u/logan)\
**Post date:** [September 19, 2022, 1:10pm UTC](https://forum.builder.io/t/connected-data-not-found-for-setting-color/2554/6 "2022-09-19T13:10:04Z")

</div>

Hey @gkappel! I’ve shared this feedback with my team and I’ll be sure to share updates regarding the Data Binding feature and State when they’re available.

Thank you!
