umldoclet icon indicating copy to clipboard operation
umldoclet copied to clipboard

Font colour is not set explicitly, rendering white text unreadable in dark mode

Open bmarwell opened this issue 4 years ago • 7 comments

Expected Behavior

Font is readable even in dark mode.

Actual Behavior

When using a browser or IDE javadoc viewer in dark mode, the font is not readable as it is rendered in white.

Steps to Reproduce the Problem

  1. Switch your browser to forced dark mode
  2. Open generated docs via IDE or browser
  3. See white text (as text uses default colour) on yellowish background (as this is explicitly set).

Specifications

  • Version: all
  • Platform: any
  • Java version: any
  • (If open source) Project link: n/a

bmarwell avatar Dec 01 '20 09:12 bmarwell

@bmarwell Do you know of a way to define a .puml diagram with a color definition in such a way that the generated .svg image displays correctly in both regular and dark mode?

sjoerdtalsma avatar Dec 01 '20 12:12 sjoerdtalsma

Hi, not really (I have not looked into it yet). But the box inner colour (bg colour) is fixed yellow, so a fixed black font should suffice.

bmarwell avatar Dec 01 '20 15:12 bmarwell

Hi, not really (I have not looked into it yet). But the box inner colour (bg colour) is fixed yellow, so a fixed black font should suffice.

That sounds doable 😉 thanks for clarifying!

sjoerdtalsma avatar Dec 02 '20 11:12 sjoerdtalsma

@bmarwell, do you think you could test with the latest snapshot version whether this issue still persists?

I upgraded the PlantUML version and if I open the SVG images and change the background to #000000 (black), the image is still readable.

sjoerdtalsma avatar Aug 17 '21 19:08 sjoerdtalsma

To use the snapshot from maven, make sure you enable the snapshot repository:

<repositories>
    <repository>
        <id>snapshots-repo</id>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        <releases><enabled>false</enabled></releases>
        <snapshots><enabled>true</enabled></snapshots>
    </repository>
</repositories>

Then you can change the 2.0.12 version of the doclet to 2.0.13-SNAPHOT to try it out.

sjoerdtalsma avatar Aug 17 '21 19:08 sjoerdtalsma

Hey @sjoerdtalsma, I currently do not maintain a project with PlantUML anymore 🙈 I might be able to apply it into a library soon, though. Sorry for the delay!

bmarwell avatar Aug 23 '21 19:08 bmarwell

No worries, I'll leave this issue open for a bit longer.

sjoerdtalsma avatar Aug 24 '21 10:08 sjoerdtalsma