Skip to content

Vector graphics fill attribute doesn't work with pascal cased CSS color names #1275

Description

@akarshpandey217

Bug Report

Description of the problem

Vector graphics fill attribute doesn't work with pascal cased CSS color names.
.fillAndStroke("Red", "#900")-- outputs black element
.fillAndStroke("red", "#900")-- works fine

CSS names can be case insensitive

Code sample

https://replit.com/@akarshpandey217/minimal-pdfkit#index.js

Your environment

  • pdfkit version: 0.12..1
  • Node version: 16.2.0
  • Browser version (if applicable):
  • Operating System: Windows

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