0.1.0 • Published 1 year ago

@akirco/materugen v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Materugen

Makes use of Material You Palette (Rust) to generate a material you scheme from an image in CLI and output it to a JSON file

Usage

# Generate from image
materugen <image path> <output json> [light|dark (default: dark)]

# Generate from hex color
materugen --hex <color> <output json> [light|dark]

# Generate from random color
materugen --random <output json> [light|dark]

Examples

From Hex Color (#052c2c)

materugen --hex "#052c2c" teal.json light
{
    "type": "teal",
    "primary": "#006a6a",
    "onPrimary": "#ffffff",
    "primaryContainer": "#6ff7f6",
    "onPrimaryContainer": "#002020",
    "secondary": "#4a6363",
    "onSecondary": "#ffffff",
    "secondaryContainer": "#cce8e7",
    "onSecondaryContainer": "#051f1f",
    "tertiary": "#4b607c",
    "onTertiary": "#ffffff",
    "tertiaryContainer": "#d3e4ff",
    "onTertiaryContainer": "#041c35",
    "error": "#ba1a1a",
    "onError": "#ffffff",
    "errorContainer": "#ffdad6",
    "onErrorContainer": "#410002",
    "background": "#fafdfc",
    "onBackground": "#191c1c",
    "surface": "#fafdfc",
    "onSurface": "#191c1c",
    "surfaceVariant": "#dae5e4",
    "onSurfaceVariant": "#3f4948",
    "outline": "#6f7979",
    "outlineVariant": "#bec9c8",
    "shadow": "#000000",
    "scrim": "#000000",
    "inverseSurface": "#2d3131",
    "inverseOnSurface": "#eff1f0",
    "inversePrimary": "#4cdada"
}

From Image (1.jpg)

materugen 1.jpg 1.jpg.json dark
{
  "type": "dark",
  "primary": "#c9beff",
  "onPrimary": "#312075",
  "primaryContainer": "#48398d",
  "onPrimaryContainer": "#e6deff",
  "secondary": "#c9c3dc",
  "onSecondary": "#312e41",
  "secondaryContainer": "#484459",
  "onSecondaryContainer": "#e6dff9",
  "tertiary": "#edb8cc",
  "onTertiary": "#482535",
  "tertiaryContainer": "#623b4c",
  "onTertiaryContainer": "#ffd8e6",
  "error": "#ffb4ab",
  "onError": "#690005",
  "errorContainer": "#93000a",
  "onErrorContainer": "#ffdad6",
  "background": "#1c1b1f",
  "onBackground": "#e6e1e6",
  "surface": "#1c1b1f",
  "onSurface": "#e6e1e6",
  "surfaceVariant": "#48454e",
  "onSurfaceVariant": "#c9c5d0",
  "outline": "#938f99",
  "outlineVariant": "#48454e",
  "shadow": "#000000",
  "scrim": "#000000",
  "inverseSurface": "#e6e1e6",
  "inverseOnSurface": "#313033",
  "inversePrimary": "#6052a6"
}

From Random Color (#4D02FC)

materugen --random random.json dark
{
  "type": "random",
  "primary": "#c8bfff",
  "onPrimary": "#2c009d",
  "primaryContainer": "#4100db",
  "onPrimaryContainer": "#e5deff",
  "secondary": "#c9c3dc",
  "onSecondary": "#312e41",
  "secondaryContainer": "#474459",
  "onSecondaryContainer": "#e5dff9",
  "tertiary": "#ecb8ce",
  "onTertiary": "#482536",
  "tertiaryContainer": "#613b4d",
  "onTertiaryContainer": "#ffd8e7",
  "error": "#ffb4ab",
  "onError": "#690005",
  "errorContainer": "#93000a",
  "onErrorContainer": "#ffdad6",
  "background": "#1c1b1f",
  "onBackground": "#e5e1e6",
  "surface": "#1c1b1f",
  "onSurface": "#e5e1e6",
  "surfaceVariant": "#48454f",
  "onSurfaceVariant": "#c9c5d0",
  "outline": "#928f99",
  "outlineVariant": "#48454f",
  "shadow": "#000000",
  "scrim": "#000000",
  "inverseSurface": "#e5e1e6",
  "inverseOnSurface": "#313033",
  "inversePrimary": "#592dff"
}