Skip to main content

Understanding the Configuration

Each widget has a range of styling options to change its visual appearances, whether that be the colours or sizing. These can either be configured for all widgets as a global style, or on a per-widget basis. There are also some global properties which may need to be changed before Iris is initialised, because they affect the entire UI.

The config is kept as a key-value pairs in a global table, viewable under Iris.Internal._config. The file config.lua contains a few different configurations (light, dark, big, small), of which some are loaded by default when first requiring Iris. You can use this file to refer to the default configuration, which are under 'colorDark', 'sizeDefault' and 'utilityDefault' (these 'categories' are purely to make the organisation clearer).

Global

To change the global configuration, you can use Iris.UpdateGlobalConfig() with a key-value pair table containing a set of configuration names and values which you would like to change. You do not need to change all the values, since everything already has a default one.

If you would like to use an existing configuration (such as light mode), you can refer to Iris.TemplateConfig which is the config.lua file.

Iris.UpdateGlobalConfig(Iris.TemplateConfig.colorLight) -- change to the template light mode

Iris.UpdateGlobalConfig({
RichText = true,
IgnoreGuiInset = true,
ScreenInsets = Enum.ScreenInsets.None,
TextColor = Color3.fromRGB(85, 49, 218),
TextSize = 16,
FramePadding = Vector2.new(2, 1),
}) -- specify the specific properties to change

-- this can be specified before Iris is even initialised
Iris.Init()
Warn

Iris.UpdateGlobalConfig() should be called sparingly, normally when Iris is first initialised, or when a specific configuration is manually made and never every frame, since it requires redrawing every widget, which involves destroying and then creating every instance.

Per-Widget

To change the config for a specific widget, you can use Iris.PushConfig() and Iris.PopConfig() around the widget. Internally, this updates the config with anything you pushed and then removes it once you pop. This also stacks, so child widgets can be entirely different to their parent.

Iris.PushConfig({
TextWrapped = true,
ContentWidth = UDim.new(0.8, 0),
FrameBgColor = Color3.fromRGB(41, 74, 122),
FrameBgHoveredColor = Color3.fromRGB(66, 150, 250),
FrameBgActiveColor = Color3.fromRGB(66, 150, 250),
})
do
-- create any widgets with this config
end
Iris.PopConfig()
Warn

When a widget's config is changed between frames, Iris has to destroy and then create the widget from scratch, so constantly changing the configuration on lots of widgets may decrease performance significantly. However, if this the config stays the same, Iris does not require a redraw.

Configuration

Colours

Every config option has both a colour and a transparency. The colour will always end with Color and the transparency will always end with Transparency, where 0 is fully opaque and 1 is fully transparent. Many colours will be in pairs or trios, as the normal, the Hovered and the Active.

Below the columns have been combined to put colour and transparency in the same row, and just the suffix of the key. To change a value, append the key with either Color or Transparency, ie. the colour of a hovering button would be ButtonHovered .. Color is ButtonHoveredColor.

KeyColorTransparencyNotes
TextColor3.fromRGB(255, 255, 255)0
TextDisabledColor3.fromRGB(128, 128, 128)0InputText placeholder and Menu shortcuts
BorderColorColor3.fromRGB(110, 110, 125)0.5Any Window or widget border
BorderActiveColor3.fromRGB(160, 160, 175)0.3Active Window or Tooltip borders
WindowBgColor3.fromRGB(15, 15, 15)0.06
PopupBgColor3.fromRGB(20, 20, 20)0.06
ScrollbarGrabColor3.fromRGB(79, 79, 79)0
TitleBgColor3.fromRGB(10, 10, 10)0Title bar of non-active Windows
TitleBgActiveColor3.fromRGB(41, 74, 122)0Title bar of active Window
TitleBgCollapsedColor3.fromRGB(0, 0, 0)0.5Title bar of collapsed Window
MenubarBgColor3.fromRGB(36, 36, 36)0
FrameBgColor3.fromRGB(41, 74, 122)0.46Many widgets
FrameBgHoveredColor3.fromRGB(66, 150, 250)0.46
FrameBgActiveColor3.fromRGB(66, 150, 250)0.33
ButtonColor3.fromRGB(66, 150, 250)0.6Any buttons
ButtonHoveredColor3.fromRGB(66, 150, 250)0
ButtonActiveColor3.fromRGB(15, 135, 250)0
ImageColor3.fromRGB(255, 255, 255)0Image tint colour, white for normal
SliderGrabColor3.fromRGB(66, 150, 250)0Slider widgets
SliderGrabActiveColor3.fromRGB(117, 138, 204)0
HeaderColor3.fromRGB(66, 150, 250)0.69Selectable, Trees and Menus
HeaderHoveredColor3.fromRGB(66, 150, 250)0.2
HeaderActiveColor3.fromRGB(66, 150, 250)0
TabColor3.fromRGB(46, 89, 148)0.14TabBar widget
TabHoveredColor3.fromRGB(66, 150, 250)0.2
TabActiveColor3.fromRGB(51, 105, 173)0
SelectionImageObjectColor3.fromRGB(255, 255, 255)0.8Internal
SelectionImageObjectBorderColor3.fromRGB(255, 255, 255)0
TableBorderStrongColor3.fromRGB(79, 79, 89)0Table outside border
TableBorderLightColor3.fromRGB(59, 59, 64)0Table insider border
TableRowBgColor3.fromRGB(0, 0, 0)1Row background
TableRowBgAltColor3.fromRGB(255, 255, 255)0.94Alternating row background
NavWindowingHighlightColor3.fromRGB(255, 255, 255)0.3Unused
NavWindowingDimBgColor3.fromRGB(204, 204, 204)0.65Unused
SeparatorColor3.fromRGB(110, 110, 128)0.5
CheckMarkColor3.fromRGB(66, 150, 250)0Checkbox and RadioButton
PlotLinesColor3.fromRGB(156, 156, 156)0
PlotLinesHoveredColor3.fromRGB(255, 110, 89)0
PlotHistogramColor3.fromRGB(230, 179, 0)0
PlotHistogramHoveredColor3.fromRGB(255, 153, 0)0
ResizeGripColor3.fromRGB(66, 150, 250)0.8Window resize grips
ResizeGripHoveredColor3.fromRGB(66, 150, 250)0.33
ResizeGripActiveColor3.fromRGB(66, 150, 250)0.05
HoverColor3.fromRGB(255, 255, 0)0.1Unused

Sizing

Sizing is either handled in pixel terms, as a number or Vector2, or as a UDim for both scale and pixels.

ContentWidth is seen most notably on any widget which does not have a fixed widget, but instead a scaling item on the left and then the text on the right, such as for Input widgets. By default, the 'boxes' on the left will take up 65% of the total width, leaving 35% for the text. This can be configured for the 'boxes' to take up the entire width.

KeyValueNotes
ItemWidthUDim.new(1, 0)Width of any widget which does not have a fixed size such as Plots, Table, Trees, Inputs
ContentWidthUDim.new(0.65, 0)Proportion of a full-width widget to be taken up by the content against text, such as Inputs, Plots, Combos
ContentHeightUDim.new(0, 0)Minimum height of widgets
WindowPaddingVector2.new(8, 8)Padding between Window border and content
WindowResizePaddingVector2.new(6, 6)Sizes of window resize corners and edges
FramePaddingVector2.new(4, 3)Padding between a frame edge and content
ItemSpacingVector2.new(8, 4)Spacing between sequential items, such as vertical space within a Window or Tree
ItemInnerSpacingVector2.new(4, 4)Spacing between parts of the same widget, such as horizontal space between boxes in Input widgets
CellPaddingVector2.new(4, 2)Table cell padding
DisplaySafeAreaPaddingVector2.new(0, 0)Padding around a window when moving
SeparatorTextPaddingVector2.new(20, 3)
IndentSpacing21
TextFontFont.fromEnum(Enum.Font.Code)
TextSize13
FrameBorderSize0
FrameRounding0
GrabRounding0
WindowRounding0Not implemented
WindowBorderSize1
WindowTitleAlignEnum.LeftRight.Left
PopupBorderSize1
PopupRounding0
ScrollbarSize7
GrabMinSize10Min pixel width of a grab bar
SeparatorTextBorderSize3
ImageBorderSize2

Others

Other config options available, some of which should be defined before initialisation and then left unchanged.

The RichText option will allow any text instance to support rich text. Equivalent with TextWrapped and these both rely on Roblox to handle support for this.

UseScreenGUIs will determine whether the root UI instances are ScreenGUIs or Frames. This is useful for when Iris is put inside existing UI, such as plugins or stories. ScreenInsets is applied first, so make sure that IgnoreGuiInset agrees with the value (false when CoreUISafeInsets, true otherwise).

KeyValueNotes
UseScreenGUIstrueWhether to use ScreenGUIs as the top level widget, or Frames instead.
ScreenInsetsEnum.ScreenInsets.CoreUISafeInsetsType of screenInset for ScreenGUIs, useful for mobile.
IgnoreGuiInsetfalseIf using ScreenGUIs
ParentnilOverrides the parent of the next widget, when creating
RichTextfalseText instances support RichText
TextWrappedfalseText instances will wrap text
DisplayOrderOffset127Root widget offset, to draw over other UI
ZIndexOffset0Unused
MouseDoubleClickTime0.30Time for a double-click, in seconds
MouseDoubleClickMaxDist6.0Distance threshold to stay in to validate a double-click, in pixels