{"id":25389983,"url":"https://github.com/importantimport/mcu-extra","last_synced_at":"2025-10-30T16:30:53.310Z","repository":{"id":166022471,"uuid":"641440630","full_name":"importantimport/mcu-extra","owner":"importantimport","description":"🖼️ Additional packages to add new features and bug fixes to Material Color Utilities.","archived":false,"fork":false,"pushed_at":"2023-12-11T10:53:41.000Z","size":1084,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-06T15:19:03.670Z","etag":null,"topics":["material","material-3","material-design","material-design-3","material-you","typescript","typescript-library"],"latest_commit_sha":null,"homepage":"https://ii.kwaa.dev/mcu-extra/mcu-extra.html","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/importantimport.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"custom":["https://donate.lol/eth/0xaBdB3f715198A4d7e6591b6ebBE8Ccf235e5D752"]}},"created_at":"2023-05-16T13:25:34.000Z","updated_at":"2024-12-01T10:00:10.000Z","dependencies_parsed_at":"2023-07-06T14:01:58.698Z","dependency_job_id":null,"html_url":"https://github.com/importantimport/mcu-extra","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/importantimport%2Fmcu-extra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/importantimport%2Fmcu-extra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/importantimport%2Fmcu-extra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/importantimport%2Fmcu-extra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/importantimport","download_url":"https://codeload.github.com/importantimport/mcu-extra/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239002642,"owners_count":19566164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["material","material-3","material-design","material-design-3","material-you","typescript","typescript-library"],"created_at":"2025-02-15T14:23:42.345Z","updated_at":"2025-10-30T16:30:52.795Z","avatar_url":"https://github.com/importantimport.png","language":"TypeScript","funding_links":["https://donate.lol/eth/0xaBdB3f715198A4d7e6591b6ebBE8Ccf235e5D752"],"categories":[],"sub_categories":[],"readme":"# MCU Extra\n\n[![npm](https://img.shields.io/npm/v/mcu-extra)](https://www.npmjs.com/package/mcu-extra)\n![minified size](https://img.shields.io/bundlephobia/min/mcu-extra)\n![downloads](https://img.shields.io/npm/dt/mcu-extra)\n\nAdditional packages to add new features and bug fixes to [Material Color Utilities](https://github.com/material-foundation/material-color-utilities).\n\n## Install\n\n\u003e `@material/material-color-utilites` is the peer dependency for this package.\n\n```bash\npnpm add mcu-extra @material/material-color-utilities # pnpm\nyarn add mcu-extra @material/material-color-utilities # yarn\nnpm i mcu-extra @material/material-color-utilities # npm\n```\n\n## Usage\n\nJust use it as usual, but import the [available utils](/src/index.ts) from `mcu-extra`.\n\n### Theming\n\n```ts\nimport { argbFromHex } from '@material/material-color-utilities'\nimport { applyTheme, themeFromSourceColor } from 'mcu-extra'\n\n// Get the theme from a hex color\nconst theme = themeFromSourceColor(argbFromHex('#f82506'), [\n  {\n    name: \"custom-1\",\n    value: argbFromHex(\"#ff0000\"),\n    blend: true,\n  },\n])\n\n// Print out the theme as JSON\nconsole.log(JSON.stringify(theme, null, 2))\n\n// Check if the user has dark mode turned on\nconst systemDark = window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n\n// Apply the theme to the body by updating custom properties for material tokens\napplyTheme(theme, {target: document.body, dark: systemDark})\n```\n\n### Documentation\n\nView the documentation here: [https://importantimport.github.io/mcu-extra/](https://importantimport.github.io/mcu-extra/)\n\nIt is automatically generated on update using `api-extractor` and `api-documenter`.\n\n## Comparison\n\n### `@material/material-color-utilities`\n\n#### Features\n\n\u003c!-- - `Scheme \u0026 CorePalette`: Tone-based Surfaces (https://github.com/material-foundation/material-color-utilities/issues/98) --\u003e\n- `themeFromSourceColor \u0026 themeFromImage`:\n  - Migrated to the new `DynamicScheme` with support for Tone-based Surfaces (`surface-container-*`) and Add-ons (`*-fixed, *-fixed-variant, *-fixed-dim`).\n  - Selectable variants and contrast level\n- `applyTheme`: Selectable color formats\n\n#### Changes\n\n- `applyTheme`: Set without suffix variables only when `brightnessSuffix` is `false`\n\n#### Bug fixes\n\n\u003c!-- - `Scheme`: Fix onErrorContainer in dark scheme (https://github.com/material-foundation/material-color-utilities/issues/62) --\u003e\n- `applyTheme`: Remove unwanted additional paletteKey property from color token with paletteTones (https://github.com/material-foundation/material-color-utilities/pull/93)\n\n### `@importantimport/material-color-utilities`\n\nSince upstream was completely unavailable at the time, I created and maintained `@importantimport/material-color-utilities`.\n\nBut it was always a pain to keep the fork updated with the upstream, so now that importing is no longer an issue I recreated an additional package `mcu-extra`.\n\nYou can get new Tone-based Surfaces, but they are no longer exported as CommonJS.\n\n## Contributing\n\nWelcome to contribute! For major improvements, please open an issue for discussion first.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimportantimport%2Fmcu-extra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimportantimport%2Fmcu-extra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimportantimport%2Fmcu-extra/lists"}