fossunited / mon_school

Frappe App for Mon School based on Frappe LMS
https://mon.school/
Other
45 stars 16 forks source link

Semi transparent color hex codes not rendered properly in preview #58

Open nikiljos opened 3 years ago

nikiljos commented 3 years ago

Describe the bug Transparent colors hex codes rendered as it's opaque color in sketches tab previews...

eg. #ff874ba9 is a semi transparent color of #F43B86 (the same effect of reducing the a value) Filling this color inside any shape shows the color properly in the run preview but shows the shape with it's original color in the preview tab

Check out this sketch https://mon.school/sketches/337472

To Reproduce Steps to reproduce the behavior:

  1. Create a new sketch with such a color code filled in shape
  2. Try running it and see it's original view
  3. Save it and see it's preview in Sketches tab
  4. See error

Expected behavior The preview image won't be rendering it as transpartent colors

Screenshots In Editor In Preview tab
image image

Desktop:

Additional context Transparent colors created with with rgba values don't have this issue

anandology commented 3 years ago

@nikiljos I guess the issue is with out svg to png rendering.

The workaround that I can think of is use the color function instead of the hex codes. Here is a version of your sketch with transparency fixed in the PNG using a work-around.

https://mon.school/sketches/346532

nikiljos commented 3 years ago

@anandology It is okay to continue as before right? I mean if I submit the one I did, you will be evaluating the png or svg for code-a-pookalam

anandology commented 3 years ago

Please continue as before. I'll take care of fixing this issue.