Type Library Revision Release 2025.3721 Keywords Material You Colors, Material UI Platforms Android
This plugin enables you to access Material UI colors set in System Settings by the user.
This plugin is supported only on Android 12 and later (Android API Level 31 and later) using Solar2D 2022.3672 and later.
local materialYouColors = require( "plugin.materialYouColors" )
Returns a 3D array of all system Material UI colors, structured as follows:
accent1
, accent2
, accent3
, neutral1
, and neutral2
.1
is the lightest and 13
is the darkest.local myColors = materialYouColors.getColors() local color = display.newRect( display.contentCenterX, display.contentCenterY, 50, 50 ) color:setFillColor(myColors[1][4][1], myColors[1][4][2], myColors[1][4][3])
To use this plugin, add an entry into the plugins
table of build.settings
. When added, the build server will integrate the plugin during the build phase.
settings = { plugins = { ["plugin.materialYouColors"] = { publisherId = "com.solar2d" }, }, }