I want to control the box shadow color in shopify schema by using the theme customizer.
Here is my code :
.test {
box-shadow: 0 0 4px 2px rgba({{ section.settings.example_shadow }}, 0.1);
}
{% schema %}
{
"name": "Example Shcema",
"settings": [
{
"type": "color",
"id": "example_shadow",
"label": "Shadow Color",
"default": "#000000"
}
]
}
when I submit this code it show me this error message :
"default must be a CSS color"
this problem it come from the "default": "#000000"
my question is how I can convert the default hex color into rgb
color???
2
Answers
You can use the default liquid tag
color_to_rgb
to convert a color to rgb color,eg.
Reade more about color filters here
Please use
color_modify: 'alpha', 0.1
i was create example than answer too you.