Skip to content

Documentation is not very clear. #4809

@AVMiraga

Description

@AVMiraga

Description

export default defineAppConfig({
  ui: {
    colors: {
      primary: 'blue',
      neutral: 'zinc'
    }
  }
})

When configuring your theme colors, you must use either color names from the default Tailwind palette (like 'blue', 'green', etc.) or reference custom colors that you've previously defined in your CSS file.

I think it would be good to add additional information about how to define color for default configuration so referenced color will be assigned. What I mean is, imagine you define a color in CSS:

@theme static {
  --color-tory-blue: #ebf9ff;
}

then decide to override primary with that color:

export default defineAppConfig({
  ui: {
    colors: {
      primary: 'tory-blue',
    }
  }
})

it won't work. Except you just need to add -500 for light theme and -400 for dark theme.

--color-tory-blue-400: #35cbff;
--color-tory-blue-500: #07a8ff;

Additional context

Link to doc

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv4#4488

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions