debkbanerji / lego-art-remix

Powerful computer vision assisted Lego mosaic creator · Over 1 million images created (so far!)

Home Page:https://lego-art-remix.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] Surprised by colour matching

hansdemol opened this issue · comments

Bug Description

First of all: I am a GREAT fan of this tool!

And then my question (not sure it is a bug...)

I am surprised by the colors that are chosen in the conversion (when using 'all tile colors'):
For example: I have filled 4 large areas using the Rebrickable values for Bright Green, Bright Light Orange, Coral and Yellow
(just as an example).

Both Bright Green and Coral get 'converted' in the expected colors.

But my 'Bright Light Orange' zone is converted into 'Yellow'.
My 'Yellow' is converted into 'Neon Yellow'

(I did not change anything in the default values of step2, 3 and 4)

In this case I would expect a 1 to 1 conversion, no?

This is the picture I used (fields filled with the rebrickable color codes)

Screenshot 2023-09-30 000838

My main question is: which HEX or RGB colors to use to get a guaranteed 1 to 1 conversion?

Thanks for looking into this!

Hans

Hi Hans,

Thanks for opening the issue! Dealing with color is a bit tricky, since there are a few different ways of classifying Lego colors, which map from real world to hex colors in different ways, and assign them different names (so Rebrickable, Bricklink, and official Lego colors may be different). The source of truth for what Lego Art Remix uses for color definitions can be found here: https://github.com/debkbanerji/lego-art-remix/blob/master/app/js/bricklink-colors.js so you can check against this file to verify what hex color is being compared against at runtime.

There is one other factor at play. When using round tiles/plates the black from the base plates bleeds through and makes the image appear darker. Lego Art Remix corrects for this darkening, so even if the input image hex code matches an existing color, that color may not be chosen, since that would make the image appear darker than it should be. If you want to see what is different when this correction is not applied, you can choose the square plate/tile pixel type and Lego Art Remix will not color correct (since the underlying base plate would not be visible if the pixels are tiles).

Let me know if something still seems off!

Hi Deb,

Can you just tell me where I can switch from 'round' to 'square'?

I just did a test with 'Lots of Dots - Square Tiles only' and the result remained the same (still displaying round pieces and colors remained the same).

Thanks for a small additional answer ;)

Hans

The 'Pixel Piece' option in step 3 determines if round or square is used. When you select a different value in this dropdown, the pictures that show up in step 3 and 4 should change accordingly.

YES! All is clear now to me!
Thanks for your help!!
Really appreciated!