trevorsandy / lpub3d

An LDraw™ editor for LEGO® style digital building instructions.
https://trevorsandy.github.io/lpub3d/
131 stars 19 forks source link

Fade previous steps colour value #689

Closed trevorsandy closed 1 year ago

trevorsandy commented 1 year ago

Subject

By default, LPub3D will use the LDraw safe colour name (name with _ between words e.g. Dark_Brown) becuse HexRGB names may have multiple LDraw colour entries (e.g. Black and Chrome_Black both use #1B2A34).

The current default meta command uses the LDraw safe name e.g.:

0 !LPUB FADE_STEPS COLOR GLOBAL "Very_Light_Orange"

However, It would be good to also have LPub3D load fade previous steps colour values with the following formats:

HexRGB (CSS prefix) #AARRGGBB or #RRGGBB. HexRGB (Hex prefix) 0xAARRGGBB

0 !LPUB FADE_STEPS COLOR GLOBAL "#FDC383"

With this change, the editor is no longer limited to LDraw colours, s/he may specify any valid colour.

Environment

Version of LPub3D - 2.4.7 Operating system - All

Expected behaviour

load fade previous steps colour value with hexRGB format

Actual behaviour

The default colour value is the LDraw safe name (Colour name without spaces)

Solution

Add the ability to use the hex RGB colour value. The LDraw safe name will remain as a valid value

Colour hex RGB Screenshot - 17_03_2023 , 18_33_51

LDraw colour safe name FadeColour689

Cheers,

trevorsandy commented 1 year ago

This change has been implemented.

Cheers,