Preprocessor function %lighten

0 votes
asked Dec 22, 2021 in Bug by Vitaly
Hi all!

I tried to use the embeded function %lighten as:

%lighten("black", 20) and get result #000000

Its mean that function not work for this color (return the original value of color, without changes )

2 Answers

0 votes
answered Dec 22, 2021 by The-Lu (63,920 points)

Hello Vitaly, and PlantUML team,

In fact this not so a bug...  It depends of the implementation. And as the code comes from:

See issues and discussions here:


But here is another issue, with another side effect:

  • %lighten of white generate an error?

I would prefer to have a color, and why not the same color: white.

Here is the test:

@startuml
: test: %lighten("#fff", 20) ;
: test: %lighten("white", 20);
@enduml

Regards,
Th.

commented Dec 22, 2021 by The-Lu (63,920 points)

In fact the issue is a little more generic, not only for the white, but for all colors near the white... here is another KO example:

@startuml
: test: %lighten("#999", 99) ;
@enduml

Regards,
Th.

+1 vote
answered Jan 11, 2022 by plantuml (294,960 points)

Thanks for the report. This is fixed in last official release.

...