Skip to content

"contrast" color is overridden by "primary" color runway #9750

@nrathi

Description

@nrathi

When you set the primary color runway in ThemeOptions, the contrast color stops working.

Expected Behavior

contrast should stay white.

image

Current Behavior

contrast becomes rgba(0, 0, 0, 0.87).

image

Steps to Reproduce (for bugs)

const theme: ThemeOptions = {
  palette: {
    primary: green,
  },
};
  1. Set primary to any color runway.

Context

The color system in material-ui-next is already very confusing... ThemeOptions.primary => color="primary", ThemeOptions.secondary => color="accent" (you should really consider renaming that), ThemeOptions.text.secondary => color="secondary", and I'm still lost as to how default and inherit work. Please fix this!

Your Environment

Tech Version
Material-UI npm:material-ui@next
React ^15.4.2
browser Chrome

Metadata

Metadata

Labels

type: bugIt doesn't behave as expected.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions