Skip to content

CSS variable is invalid color #22

@artrayd

Description

@artrayd

I'm using this code to get CSS variable color and check its contrast:

const titleColor = getComputedStyle(document.documentElement).getPropertyValue('--titleTextColor')

And every time I get this error:
Error: Invalid Color : #000000 at ColorContrastChecker.hexToLuminance

Can't figure out why that happens.

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