Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose image background color based on color of the thumbnail content #1507

Closed
EmJay276 opened this issue Aug 4, 2023 · 8 comments · Fixed by #1535
Closed

Choose image background color based on color of the thumbnail content #1507

EmJay276 opened this issue Aug 4, 2023 · 8 comments · Fixed by #1535
Labels
💡 Type: FR Requests a new feature

Comments

@EmJay276
Copy link
Contributor

EmJay276 commented Aug 4, 2023

Requested feature:

If I print something in black, and use the dark theme, it is really hard to see the object in the thumbnail.
Is it possible to choose the background color of this black based on the color of the picture?

If you point out to me where it could be (possibly) done in the code, I can have a look at it.

grafik

Solves the following problem:

No response

Additional information:

No response

@EmJay276 EmJay276 added the 💡 Type: FR Requests a new feature label Aug 4, 2023
@meteyou
Copy link
Member

meteyou commented Aug 4, 2023

sry, but i would recommend to use a other color in your slicer or use a different background color in your slicer. mainsail just display the thumbnail as it is...

@meteyou meteyou added the ❔ User Input Further information is requested label Aug 4, 2023
@EmJay276
Copy link
Contributor Author

EmJay276 commented Aug 5, 2023

It is a PNG with a transparent background, that's why I think mainsail could easily handle this by adjusting the background color of the widget based on the image color.

@ja2ui0
Copy link

ja2ui0 commented Aug 16, 2023

EmJay276 is correct, the slicer outputs a transparent PNG for the thumbnail and therefore the background will be whatever Mainsail chooses for it to be. It should select lighter or darker colors within a range depending on the lightness or darkness of the thumbnail, or at least allow the user to override the default color (or brightness at least, perhaps with a slider).

@EmJay276
Copy link
Contributor Author

I figured out what needs to be changed

<div class="v-image__image v-image__image--cover" style="background-image: url(&quot;http://voronika/server/files/gcodes/.thumbs/VC_sturdy_handles-400x400.png?timestamp=1693058858.16708&quot;); background-position: center center;"></div>

needs an additional background-color: #FFF; (or whatever color)

Before
grafik

After
grafik

@dw-0
Copy link
Member

dw-0 commented Aug 27, 2023

Don't use a full black for the color. I just tested it with dark colors and with an rgb value of (40,40,40) its imho still fine. (assuming you are using superslicer)
image
hard to see, but with your black color you don't even get any shades at all. so thats even an issue of the slicer itself, its just a flat black area you get there. imho it looks horrible even with a white or light background.

@ja2ui0
Copy link

ja2ui0 commented Aug 30, 2023

I don't use full black for the color anyway, I use a dark grey in the slicer so it's more visible in the slicer itself. It's great that Cura allows me to change filament colors to improve the viewing experience. Like OP, I'd still recommend an option in the mainsail interface to make the thumbnail background more contrasted.

@meteyou
Copy link
Member

meteyou commented Aug 30, 2023

@ja2ui0 i already implemented it -> #1535

@github-actions
Copy link
Contributor

Ahoi!

It looks like there hasn't been any recent updates on
this issue. If you created this issue and no longer
consider it to get merged, then please login to github
and close it. Otherwise, if there is no further activity
on this issue, it will be automatically closedwithin the
next 7 days.

Fair wind and a following sea!
~ Your friendly MainsailGithubBot

PS: I'm just an automated script, not a real sailor.

@meteyou meteyou removed ❔ User Input Further information is requested 💤 Stale labels Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 Type: FR Requests a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants