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?
Answered
Setting Color through REST API
Best answer by Steve Appling
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.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.