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.
| Memory category | Instances |
|---|
Member index 1
Removed member index 1
| History | Member | |
|---|---|---|
| 474 | GetPath(assetid: string, modifier: StudioStyleGuideModifier = Default): string |
Description
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:
1 2 | |
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.
History 9
- 474 Remove GetPath
- 462 Change ThreadSafety of GetPath from to Unsafe
- 462 Change ThreadSafety of GetColor from to Unsafe
- 454 Change Tags of GetPath from [] to [Deprecated]
- 452 Change Tags of GetPath from [Deprecated] to []
- 453 Change Tags of GetPath from [] to [Deprecated]
- 350 Add GetPath
- 350 Add GetColor
- 350 Add StudioTheme
Members 1
GetColor
| Parameters (2) | Default | |
|---|---|---|
| styleguideitem | StudioStyleGuideColor | |
| modifier | StudioStyleGuideModifier | Default |
| Returns (1) | ||
| Color3 | ||
The GetColor() function returns the Color3 corresponding to the arguments provided. For instance, if you would like to get the Color3 of the Studio "MainButton" when it's disabled, you can use the following code:
1
| |
See the StudioStyleGuideColor reference for a list of Studio elements and StudioStyleGuideModifier for a list of modifiers.
| Security | PluginSecurity |
|---|---|
| Thread safety | Unsafe |
Removed members 1
GetPath
| Parameters (2) | Default | |
|---|---|---|
| assetid | string | |
| modifier | StudioStyleGuideModifier | Default |
| Returns (1) | ||
| string | ||
| Security | PluginSecurity |
|---|---|
| Thread safety | Unsafe |