I’m trying to set the color of a sticker using the REST API, but not having much luck. When I set style.backgroundColor to any value other than “#fff9b1” I get an result of error code 400 (Bad Request). Are there only certain allowed values? Could these be specified in the documentation?
Okay - I think I have figured this out and am posting here for other’s reference.
If you are creating a sticker, you can only set the color value to one of 12 specific values:
- GREY = "#f5f6f8"
- YELLOW = "#fff9b1"
- LIGHT_ORANGE = "#f5d128"
- OLIVE = "#d0e17a"
- GREEN = "#d5f692"
- PASTEL_BLUE = "#a6ccf5"
- AQUA = "#67c6c0"
- BLUE = "#23bfe7"
- ORANGE = "#ff9d48"
- PINK = "#ea94bb"
- RED = "#f16c7f"
- PURPLE = "#b384bb"
This really should be documented. Other widgets (like Cards) seem to be able to take a wider range of colors.
Thanks a lot
Hey guys, regarding this topic I have an additional question.
Why there are only 12 values available, even if we can set 16 colors from UI?
EDIT:
I checked colors available from UI and in REST API and it seems 7 out of 16 UI colors don’t work through API:
```
Grey = '#f5f6f8',
Yellow = '#fff9b1',
Orange = '#f5d128',
IntenseOrange = '#ff9d48',
Lime = '#d5f692',
// Green = '#c9df56', // Not working
// BottleGreen = '#93d275', // Not working
Turquoise = '#67c6c0',
Pink = '#ffcee0',
IntensePink = '#ea94bb',
// Purple = '#be88c7', // Not working
Red = '#f16c7f',
// Blue = '#a6ccf5', // Not working
// Aqua = '#6cd8fa', // Not working
// Violet = '#7b92ff', // Not working
// Black = '#000000', // Not working
```
It feels like a bug...
[deleted]
[deleted]
[deleted]
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.