Color
Adds a Color picker panel in the Makeswift builder to visually edit a RGBA string prop.

Params
Text for the panel label in the Makeswift builder.
The description shown in the Panel of the Makeswift builder. This can be written in Markdown format.
Added in v0.24.8.
Position for the color label within the panel.
The value passed to your component when nothing is set in the Makeswift
builder. Accepts either a CSS color string (e.g., "black", "#4f46e5") or an
object with color and opacity fields (e.g., { color: "#4f46e5", opacity: 0.25 }).
Added in v0.28.6:
object form { color, opacity }.
Indicates whether to hide the alpha channel slider.
What is the alpha channel slider?

Prop type
The Color control passes a string RGBA value to your component. When a defaultValue is provided (either as a string or an object), the resolved prop type narrows to string instead of string | undefined. If you don’t set a defaultValue and no value is set in the builder, your component receives undefined.
Example
The following examples add two Color controls to the backgroundColor and color props of a Button component.
Using inline styles
Using CSS variables
Using object defaultValue with opacity
You can pass an object with color and opacity fields to set a semi-transparent default. Available since v0.28.6.
.makeswift.ts is a naming convention for organizing Makeswift registration
code. Learn
more.