JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q27605F
  • License WTFPL

Browser script to generate colors for Shiraha.

Package Exports

  • shiraha-colors
  • shiraha-colors/nomodule
  • shiraha-colors/package.json
  • shiraha-colors/worker

Readme

Shiraha Colors

Browser script to generate colors for Shiraha / Material Web.

Usage

<script type="module" src="https://esm.run/shiraha-colors" async></script>

nomodule

Add <script nomodule to be used in environments that do not support ES Module.

<head>
  <script type="module" src="https://esm.run/shiraha-colors" async></script>
  <script nomodule src="https://esm.run/shiraha-colors/nomodule" async></script>
</head>

worker (experimental)

An experimental version that moves some of the work to Web Worker but increases in size.

<script type="module" src="https://esm.run/shiraha-colors/worker" async></script>

Configuration

You can see all supported configuration options in src/global.d.ts.

<head>
  <script>
    shiraha = {
      colors: {
        /* Shiraha Colors Config */
      },
    }
  </script>
  <script type="module" src="https://esm.run/shiraha-colors" async></script>
</head>

with Partytown

Shiraha Colors is currently not compatible with Partytown. see #20

Partytown does not support ES Module at this time. see partytown#195

<head>
  <script
    type="text/partytown"
    src="https://esm.run/shiraha-colors/nomodule"
    async
  ></script>
  <script>
    partytown = {
      forward: ['shiraha'],
    }
  </script>
  <script>
    /* Inlined Partytown Snippet */
  </script>
</head>