Skip to content

vonhyou/material-color-utilities-ue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Material Color Utilities for Unreal Engine

An Unreal Engine plugin that wraps Google's Material Color Utilities C++ library, exposing the full Material Design 3 dynamic color system to Blueprint and C++.

The third-party library is built as a static library with no external dependencies (Abseil is removed), so it integrates cleanly into the UE build pipeline with no additional setup.

Supported Platforms

Win64, Linux, Mac

Supported Engine Version

Unreal Engine 5.7

Features

  • Dynamic color scheme generation -- produce a complete set of 54 Material Design 3 color roles from a single seed color.
  • 9 scheme variants -- Tonal Spot, Neutral, Vibrant, Expressive, Fidelity, Content, Rainbow, Fruit Salad, and Monochrome.
  • Light and dark mode -- toggle bIsDark to generate a dark-mode scheme.
  • WCAG contrast adjustment -- tune contrast level from -1.0 to 1.0.
  • Color Scheme data asset (UMCUColorScheme) -- configure seed color, variant, and contrast in the editor; the resolved scheme updates live.
  • Editor detail customization -- visual palette preview directly in the Details panel for scheme data assets.
  • Tonal palette sampling -- sample any tone (0--100) from a seed color's HCT palette, or retrieve the standard 11-stop tone swatch.
  • Color harmonization -- shift a design color's hue toward a key color for visual harmony.
  • Contrast utilities -- compute WCAG contrast ratio between two colors, or find the lightest/darkest color that meets a target contrast ratio.
  • Dislike filtering -- detect colors in commonly disliked hue/chroma ranges and auto-correct them.
  • HCT decomposition and construction -- convert between FLinearColor and HCT (Hue, Chroma, Tone) components.
  • Full Blueprint support -- every function is BlueprintCallable with tooltips and categorized nodes.

Planned

  • Generate scheme from texture (extract dominant color via quantization)
  • Batch scheme generation for multiple seed colors

Installation

The plugin is available on the Fab and can be installed directly from the Epic Games Launcher. Alternatively, you can manually copy the plugin files into your project or engine directory. The content is the same regardless of installation method and the plugin might be slightly delayed since I need to upload it and get it approved on the Fab, but I'll try to keep it up to date.

From Fab (Easy)

  1. Open the Fab product page and click Add to My Library.
  2. In the Epic Games Launcher, go to your Library and install the plugin to your engine version.
  3. Enable Material Color Utilities in Edit > Plugins.

Manual Installation

Copy the MaterialColorUtilities plugin folder to either:

  • Project plugins -- YourProject/Plugins/MaterialColorUtilities/
  • Engine plugins -- {EngineDir}/Plugins/Marketplace/MaterialColorUtilities/

Then enable the plugin in Edit > Plugins and restart the editor.

Quick Start

Blueprint

  1. Create a new Data Asset of type MCU Color Scheme.
  2. Set the Seed Color, Variant, and Dark/Light mode in the Details panel. The resolved palette preview updates immediately.
  3. Use the Get Color From Asset node to retrieve any of the 54 color roles at runtime.

Alternatively, call Generate Scheme directly from any Blueprint to produce a scheme struct without a data asset.

C++

#include "MCUFunctionLibrary.h"

// Generate a scheme from a seed color
FMCUDynamicScheme Scheme = UMCUFunctionLibrary::GenerateScheme(
    FLinearColor(0.57f, 0.14f, 0.22f),  // seed color
    EMCUSchemeVariant::TonalSpot,
    false,   // light mode
    0.f      // default contrast
);

// Retrieve a specific role
FLinearColor Primary = UMCUFunctionLibrary::GetColorByRole(
    Scheme, EMCUColorRole::Primary);

Credits

This plugin is an unofficial Unreal Engine wrapper around the Material Color Utilities library by the Material Foundation. The original library is licensed under the Apache License 2.0.

Disclaimer

This plugin is an independent project and has no affiliation with Google or the Material Foundation.

About

An unofficial static library build of the Material Color Utilities by material-foundation, specifically optimized for Unreal Engine by removing external dependencies such as Abseil.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors