Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tonalOffset Not Respected in colorSchemes #44239

Closed
aress31 opened this issue Oct 28, 2024 · 1 comment
Closed

tonalOffset Not Respected in colorSchemes #44239

aress31 opened this issue Oct 28, 2024 · 1 comment
Labels
customization: theme Centered around the theming features

Comments

@aress31
Copy link

aress31 commented Oct 28, 2024

Steps to reproduce

export const getDesignTokens = () => ({
  colorSchemes: {
    dark: {
      palette: {
        primary: { main: red[700] },
        contrastThreshold: 4,
        tonalOffset: 0.5,
      },
      tonalOffset: 0.5,
    },
    light: {
      palette: {
        primary: { main: red[400] },
        contrastThreshold: 4,
        tonalOffset: 0.5,
      },
      tonalOffset: 0.5,
    },
  },
});
  const theme = responsiveFontSizes(
    createTheme({
      ...getDesignTokens(),
      ...getThemedComponents(),
    }),
  );

Current behavior

The tonal offset does not take effect.

Expected behavior

The tonal offset within color schemes should be applied to control the values for both light and dark tones.

Context

No response

Your environment

  System:
    OS: Windows 10 10.0.19045
  Binaries:
    Node: 20.5.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.2.5 - C:\Program Files\nodejs\npm.CMD  
    pnpm: Not Found
  Browsers:
    Chrome: Not Found
    Edge: Chromium (129.0.2792.65)
  npmPackages:
    @emotion/react: ^11.13.3 => 11.13.3 
    @emotion/styled: ^11.13.0 => 11.13.0 
    @mui/core-downloads-tracker:  6.1.5 
    @mui/icons-material: ^6.1.5 => 6.1.5 
    @mui/material: ^6.1.5 => 6.1.5 
    @mui/private-theming:  6.1.5
    @mui/styled-engine:  6.1.5
    @mui/system:  6.1.5
    @mui/types:  7.2.18
    @mui/utils:  6.1.5
    @types/react:  18.3.3
    react: ^18.3.1 => 18.3.1
    react-dom: ^18.3.1 => 18.3.1
    typescript:  4.9.5

Search keywords: tonalOffset, colorSchemes, theming

@aress31 aress31 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 28, 2024
@aress31 aress31 closed this as completed Oct 28, 2024
Copy link

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

@aress31 How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

@github-actions github-actions bot removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 28, 2024
@zannager zannager added the customization: theme Centered around the theming features label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customization: theme Centered around the theming features
Projects
None yet
Development

No branches or pull requests

2 participants