Skip to content

Allow SVG to use colour keywords #242

Description

@miken32

When using SVG output, there's currently no way to use any of the CSS 3 Extended Colour Keywords for the background, foreground, or eye fill parameters. Granted, there's not much value in being able to specify a background color of cornflowerblue like we're writing a web page in 1995. But the currentColor keyword is very helpful, especially when integrating a QR code into a page's dark/light mode contents.

The ColorInterface is pretty much restricted to numeric values, short of a huge rewrite; a simpler solution might be to allow a string-backed enum to also be passed wherever a ColorInterface is accepted now. (Some checking would need to be done to ensure the SVG-specific values are only used with the SVG renderer.) Happy to submit a PR if this seems like a reasonable approach.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions