Class · inherits Instance
StudioTheme
A collection of colors that make up a Roblox Studio theme, letting a plugin query the color of a Studio UI element for the theme the user currently has active.
About StudioTheme
A StudioTheme represents one of Roblox Studio's UI color themes, such as
the built-in Light and Dark themes, as a palette of colors loaded from
the theme's definition. Each color is identified by a
StudioStyleGuideColor element (the UI element) together with a
StudioStyleGuideModifier (the element's state, which defaults to
Default), so a plugin can match its appearance to whichever theme the user
currently has active.
Access the currently active theme through Studio.Theme, then call
StudioTheme.GetColor to look up an individual color:
local theme = settings().Studio.Theme
local color = theme:GetColor(Enum.StudioStyleGuideColor.MainBackground)
Because a user can switch the active theme at any time, listen for
Studio.ThemeChanged to refresh your plugin's colors when the theme
changes.
Methods 1
GetColor
(styleguideitem: StudioStyleGuideColor, modifier: StudioStyleGuideModifier = Default) → Color3PluginReturns the color corresponding to the arguments provided.The GetColor() function returns the
Color3corresponding to the arguments provided. For instance, if you would like to get theColor3of the Studio "MainButton" when it's disabled, you can use the following code:settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.MainButton, Enum.StudioStyleGuideModifier.Disabled)See the
StudioStyleGuideColorreference for a list of Studio elements andStudioStyleGuideModifierfor a list of modifiers.
StudioTheme also has every member of Instance. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.