Skip to content

Readable color returnIfDarkColor isn't working #615

@majkl-zumberi

Description

@majkl-zumberi
  • polished version: ^4.2.2
  • JSS-in_CSS library and version: styled-components ^5.1.1
  • Any relevant JS library and version: React 17.0.2, nextjs 12.1.0

Mixin/Helper/Shorthand Usage

export const WelcomeContentTitle = styled.h1`
  color: ${(props) =>
    readableColor(
      props.theme.colors.secondary,
      props.theme.colors.white,
      props.theme.colors.tertiary
    )};
`

What You Are Seeing

i provide #f4d449 as secondary #FFF as white and #2b3399 as tertiary

returns the default color returnIfDarkColor

What You Expected To See

returns #000 instead of #2b3399

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions