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 (46,240 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:

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


commented Dec 22, 2021 by The-Lu (46,240 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:

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


+1 vote
answered Jan 11 by plantuml (276,340 points)

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