On the field settings page, in the Style section, for the "Background Color" and "Border Color" fields, each has a prefix of "#", and each has help text that mentions an example value of "FFFFFF". All of this suggests that the user does not need to include any "#" in the value entered. However, omitting the "#" causes the value to be ignored.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | fix_color_styles_for_canvas-2019887-1.patch | 1.02 KB | lirantal |
Comments
Comment #1
lirantal commentedI can confirm the issue.
This happens because the color code is handed out to jQuery's .css() function which hopes to apply a full color code notation, such as "#FF0000" or "rgb()", yet the hex color code is provided without the hash prefix.
While the problem seems at first an issue to add the "#" prefix on hex colors notation due to the input field length limit of 6 characters, the workaround is simply to provide the hex color code short notation, i.e: "#F00".
Attached is a patch to fix the issue. It appends the hash prefix before it hands it out to jQuery's CSS.
Comment #2
lirantal commentedComment #3
mjross commentedThe patch worked. Thank you, Liran!