Skip to content

Nightwind doesn't invert custom weights #60

@ghiculescu

Description

@ghiculescu

We have a theme that looks like this:

  theme: {
    colors: {
      blue: {
        "25": "#FAFEFF",
        "50": "#EDFAFF",
        "75": "#DDF2FA",
        "100": "#CAEFFC",
        "200": "#A7E4FA",
        "300": "#84D7F5",
        "400": "#5EC5EB",
        "500": "#3FAFD7",
        DEFAULT: "#3FAFD7",
        "600": "#329DC7",
        "700": "#288BB5",
        "800": "#1F77A6",
        "900": "#186294",
        "950": "#114669",
      },
    },
  }

The 25 colour isn't being inverted, even with this setting:

  theme: {
    nightwind: {
      colorScale: {
        25: 900,
      },
    },
  }

It seems like this is happening because colorClasses is built based on the hardcoded list of weights. I don't see any way to customise that.

Is that intended or is there appetite to change this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions