{"bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a2c76f60b82a53d399b769ef91ec52e83ad3c3bd","tarball":"https://registry.npmjs.org/@material/theme/-/theme-0.35.0.tgz","fileCount":10,"integrity":"sha512-jTjRDPKlWVCNnSs4RRe/eq9+F5lFBzxfbuI7klgCR6jTXRMB93jKKKO7k6chgo9l0oObhLh81ao6sq/eV0WFIw==","signatures":[{"sig":"MEUCIQDclir0IFEz26tOydgfVZFLUYB8cCVa0w2fECb3K2oDwgIgF1ATNhTIO+cLzv3KZ1NsxnXar0sGVZpqgXMLLOr6l0Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":45089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa3mD3CRA9TVsSAnZWagAAwysP/2N0a3MItwt+GWzJH+GK\nxXckCEUWSwJPUm+FJ2PS6YSLMoYYwc5gCV3KQRMX78+WJ9WL0ZaPmbEgOo17\nW7KLTlaR9PlJ0VwSDktEj4yIMpZ8pUS1pDrn/9ZrlKsB7B2UwqvyMnbmB9Zv\nmQMzZYOxXJR1tQxRn1uYjpJJxPUICVa/xwljVx3XQ91X7V2e3UetH/nrL9oD\nYO7Q8e3dB+hAbeld0MK8+ulu+pQ9KZ576rd0SlapORo0u02y3XJDmpWqgR+M\nk3xXEJOZO1jns+oAodxqPHqhmPYdIZmX7X7fSx7q8gqyG0sgZXNgqsTTWuIN\nvia2LhecEhCOZOvql+0Bj3t5HyKqDLohf9DKivbsptinrLIv4v2+lGeIh8LA\nyui0HQoeqEPvVqsjGQDz3aEmWXCZUHHdmW2HZYVv/vaG12y9iONfRligOiRN\n93Lpv9PnpniX6Yj04dBhQFC40qLo9g5PN/zHXHhx3DdhneLnsrmUO/TND/Nd\nzBTsl8WuTP0TmDZ+0uRysTFK3vk3M+Auk5iwuIUGnYT6/njkcu4T1ALkzGt8\n4MJ6WNYx8Uc5ObPpJRBDzSD+q166Hh12wV1yLHpBOLuyP82I3UWHWlu1qBF/\nAMGZAisSPxcGd3s47yOlYxHHXIat0dvtY6Nldg+ByKYzLBpldW66F2EBVqxz\nmZHh\r\n=OKah\r\n-----END PGP SIGNATURE-----\r\n"},"name":"@material/theme","readme":"<!--docs:\ntitle: \"Theme\"\nlayout: detail\nsection: components\nexcerpt: \"Color theming for MDC Web components.\"\niconId: theme\npath: /catalog/theme/\n-->\n\n# Theme\n\n<!--<div class=\"article__asset\">\n  <a class=\"article__asset-link\"\n     href=\"https://material-components-web.appspot.com/theme/index.html\">\n    <img src=\"{{ site.rootpath }}/images/mdc_web_screenshots/themes.png\" width=\"241\" alt=\"Themes screenshot\">\n  </a>\n</div>-->\n\nThe Material Design color system can be used to create a color scheme that reflects your brand or style.\n\n## Design & API Documentation\n\n<ul class=\"icon-list\">\n  <li class=\"icon-list-item icon-list-item--spec\">\n    <a href=\"https://material.io/guidelines/style/color.html\">Material Design guidelines: Color</a>\n  </li>\n  <li class=\"icon-list-item icon-list-item--link\">\n    <a href=\"https://material-components-web.appspot.com/theme/index.html\">Demo</a>\n  </li>\n</ul>\n\n## Installation\n\n```\nnpm install @material/theme\n```\n\n## Usage\n\n### Color Scheme\n\nYou can define the theme color variables before importing any MDC Web components:\n\n```scss\n$mdc-theme-primary: #fcb8ab;\n$mdc-theme-secondary: #feeae6;\n$mdc-theme-on-primary: #442b2d;\n$mdc-theme-on-secondary: #442b2d;\n\n@import \"@material/button/mdc-button\";\n```\n\nWe suggest you follow the Web Content Accessibility Guidelines 2.0 when picking the values for on-primary, on-secondary, etc. These values should be accessible on top of the corresponding value, e.g. primary and secondary.\n\nhttps://www.w3.org/TR/WCAG20\n\n### Advanced customization\n\nColor scheme will only get you 80% of the way to a well-designed app. Inevitably there will be some components that do not work \"out of the box\". To fix problems with accessibility and design, we suggest you use our Sass mixins, such as `mdc-button-filled-accessible`. For more information, consult the documentation for each component.\n\n### Non-Sass customization\n\nOnly a very limited number of Material Design color customization features are supported for non-Sass clients. They are a set of CSS custom properties, and a set of CSS classes.\n\n#### CSS Custom Properties\n\n**A note about `<TEXT_STYLE>`**, `<TEXT_STYLE>` represents the lowercase name of the text styles listed above, e.g. `hint`.\n\nCSS Custom property | Description\n--- | ---\n`--mdc-theme-primary` | The theme primary color\n`--mdc-theme-secondary` | The theme secondary color\n`--mdc-theme-background` | The theme background color\n`--mdc-theme-on-primary` | Text color on top of a primary background\n`--mdc-theme-on-secondary` | Text color on top of a secondary background\n`--mdc-theme-text-<TEXT_STYLE>-on-light` | Text color for TEXT_STYLE on top of light background\n`--mdc-theme-text-<TEXT_STYLE>-on-dark` | Text color for TEXT_STYLE on top of dark background\n\n#### CSS Classes\n\n> **A note about `<TEXT_STYLE>`**, `<TEXT_STYLE>` represents the lowercase name of the text styles listed above, e.g. `hint`.\n\nCSS Class | Description\n--- | ---\n`mdc-theme--primary` | Sets the text color to the theme primary color\n`mdc-theme--secondary` | Sets the text color to the theme secondary color\n`mdc-theme--background` | Sets the background color to the theme background color\n`mdc-theme--on-primary` | Sets the text color to the theme on-primary color\n`mdc-theme--on-secondary` | Sets the text color to the theme on-secondary color\n`mdc-theme--primary-bg` | Sets the background color to the theme primary color\n`mdc-theme--secondary-bg` | Sets the background color to the theme secondary color\n`mdc-theme--text-<TEXT_STYLE>-on-light` | Sets text to a suitable color for TEXT_STYLE on top of light background\n`mdc-theme--text-<TEXT_STYLE>-on-dark` | Sets text to a suitable color for TEXT_STYLE on top of dark background\n\n### Sass Mixins, Variables, and Functions\n\nMixin | Description\n--- | ---\n`mdc-theme-prop($property, $style, $important, $edgeOptOut)` | Applies a theme color or a custom color to a CSS property, optionally with `!important`. If `$edgeOptOut` is `true` and a theme color is passed, the style will be wrapped in a `@supports` clause to exclude the style in Edge to avoid issues with its buggy CSS variable support.\n\n#### `mdc-theme-prop` Properties\n\nThe properties below can be used as the `$style` argument for the `mdc-theme-prop` mixin. Literal color values (e.g., `rgba(0, 0, 0, .75)`) may also be used instead.\n\n**A note about `<TEXT_STYLE>`**, `<TEXT_STYLE>` represents the lowercase name of the text styles listed above, e.g. `hint`.\n\nProperty Name | Description\n--- | ---\n`primary` | The theme primary color\n`secondary` | The theme secondary color\n`background` | The theme background color\n`text-<TEXT_STYLE>-on-light` | TEXT_STYLE on top of a light background\n`text-<TEXT_STYLE>-on-dark` | TEXT_STYLE on top of a dark background\n`on-primary` | A text/iconography color that is usable on top of primary color\n`on-secondary` | A text/iconography color that is usable on top of secondary color\n\n\n#### `mdc-theme-luminance($color)`\n\nCalculates the luminance value (0 - 1) of a given color.\n\n```scss\n@debug mdc-theme-luminance(#9c27b0); // 0.11654\n```\n\n#### `mdc-theme-contrast($back, $front)`\n\nCalculates the contrast ratio between two colors.\n\n```scss\n@debug mdc-theme-contrast(#9c27b0, #000); // 3.33071\n```\n\n#### `mdc-theme-tone($color)`\n\nDetermines whether the given color is \"light\" or \"dark\".\n\nIf the input color is a string literal equal to `\"light\"` or `\"dark\"`, it will be returned verbatim.\n\n```scss\n@debug mdc-theme-tone(#9c27b0); // dark\n@debug mdc-theme-tone(light);   // light\n```\n\n#### `mdc-theme-contrast-tone($color)`\n\nDetermines whether to use light or dark text on top of a given color.\n\n```scss\n@debug mdc-theme-contrast-tone(#9c27b0); // light\n```\n\n#### `mdc-theme-prop-value($property)`\n\nIf `$property` is a literal color value (e.g., `blue`, `#fff`), it is returned verbatim. Otherwise, the value of the\ncorresponding theme property (from `$mdc-theme-property-values`) is returned. If `$property` is not a color and no\nsuch theme property exists, an error is thrown.\n\nThis is mainly useful in situations where `mdc-theme-prop` cannot be used directly (e.g., `box-shadow`).\n\nUnlike the `mdc-theme-prop` mixin, this function does _not_ support CSS custom properties.\nIt only returns the raw color value of the specified theme property.\n\n> NOTE: This function is defined in `_variables.scss` instead of `_functions.scss` to avoid circular imports.\n\n```scss\n@debug mdc-theme-prop-value(primary); // #3f51b5\n@debug mdc-theme-prop-value(blue);    // blue\n```\n\n#### `mdc-theme-accessible-ink-color($fill-color, $text-style: primary)`\n\nReturns an accessible ink color that has sufficient contrast against the given fill color.\n\nParams:\n\n- `$fill-color`: Supports the same values as `mdc-theme-prop-value`\n- `$text-style`: Value must be one of `primary`, `secondary`, `hint`, `disabled`, `icon` (see `$mdc-theme-text-colors`)\n\n> NOTE: This function is defined in `_variables.scss` instead of `_functions.scss` to avoid circular imports.\n\n```scss\n@debug mdc-theme-accessible-ink-color(secondary); // rgba(0, 0, 0, .87) (text-primary-on-light)\n@debug mdc-theme-accessible-ink-color(blue);      // white              (text-primary-on-dark)\n```\n","license":"Apache-2.0","_npmUser":{"name":"bonniez","email":"bonniez@google.com"},"homepage":"https://github.com/material-components/material-components-web#readme","keywords":["material components","material design","theme"],"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"5.6.0","description":"The Material Components for the web theming system","directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"material-admin","email":"lynnjepsen+npm@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_nodeVersion":"8.7.0","_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/theme_0.35.0_1524523254538_0.11637471020327816","host":"s3://npm-registry-packages"},"_id":"@material/theme@0.35.0","version":"0.35.0"}