🚀
Maclib UI Library
  • Information
    • Welcome
    • Documentation Formatting
    • Miscellaneous
  • Getting Started
    • Loading Maclib
      • Creating a window
        • Adding a Global Setting
        • Displaying a notification
        • Prompting a dialog
        • Creating a tab group
          • Adding tabs
            • Adding sections
              • Button
              • Input
              • Slider
              • Toggle
              • Keybind
              • Colorpicker
              • Dropdown
              • Header
              • Paragraph
              • Label
              • Sub Label
              • Divider
              • Spacer
Powered by GitBook
On this page

Was this helpful?

  1. Getting Started
  2. Loading Maclib
  3. Creating a window
  4. Creating a tab group
  5. Adding tabs
  6. Adding sections

Colorpicker

PreviousKeybindNextDropdown

Last updated 7 months ago

Was this helpful?

Section:Colorpicker({
  Name <string>
  Default <color3>
  Alpha <number or nil> -- Transparency
  Callback <function(): color3, number>
}, <string or nil> Flag)

Functions

:UpdateName(<string>)
:SetVisibility(<boolean>)
:SetColor(<color3>)
:SetAlpha(<number>)

.Color : color3
.Alpha : number
.IgnoreConfig <boolean>
.Settings : table -- Not everything may be updated, but Callback should be correct.

Example

sections.MainSection1:Colorpicker({
	Name = "ESP Color",
	Default = Color3.fromRGB(255,0,0),
	Alpha = 0,
	Callback = function(color, alpha)
		local r, g, b = math.round(color.R * 255), math.round(color.G * 255), math.round(color.B * 255)
		local formattedColor = string.format("%d, %d, %d", r, g, b)

		Window:Notify({
			Title = "Kuzu Hub",
			Description = string.format("Changed ESP Color\nColor: %s\nAlpha: %.2f", formattedColor, alpha),
			Lifetime = 3
		})
	end,
}, "ESPColorToggle")