Skip to content

The colour editor and colour picker

A colour row holds one colour or a gradient. The colour picker sets one colour. The colour editor draws a gradient, a run of colours with a marker for each. Exercise 4 uses both for the first time. This page lists everything they can do.

What it makes possible:

  • A fire gradient. Four markers: white, yellow, orange, dark red.
  • A blend from red to blue that stays vivid in the middle. Press Hues.
  • A gradient turned end for end, with no marker moved by hand. Press Invert.
  • A gradient taken from a script, or handed to one. Press Code.

On most rows a gradient runs over the particle’s life, from the left end at the start to the right end at the finish. In a Blender state it runs along the beam, from one Attachment to the other.

A colour row in the Properties panel has three parts.

Part of the rowActionResult
SwatchClickThe colour picker opens. The colour picked is written to every selected emitter as one flat colour.
BoxEnter three numbers, R, G, B, each from 0 to 255The row holds that one colour.
⋯PressThe colour editor opens beside the row.
⋯Hold Shift and clickA small menu opens: Copy graph, Paste graph, Reset default.

The swatch shows the colour, or the gradient. The box reads <ColorSequence> while the row holds a gradient. Fewer than three numbers in the box are refused.

The title reads Color - Color on a Color row. The second word is the name of the row. The editor can be dragged by its header. Its size is fixed.

PlaceControlWhat it does
HeaderCodeShows the gradient as Roblox code, and reads code back in.
HeaderCopy, PasteCopy the whole gradient, or paste the last one copied.
HeaderXCloses the editor without keeping the result.
BarThe gradient barShows the gradient from start to end.
BarMarkersTriangles under the bar, one for each colour of the gradient.
Info rowTime:The place of the selected marker, from 0 at the left end to 1 at the right end.
Info rowDeleteRemoves the selected marker.
FooterInvertTurns the gradient end for end.
FooterHuesAdds markers so that a blend between two distant hues stays vivid.
FooterReloadReturns the gradient to what it was when the editor opened. The editor stays open.
FooterCancelCloses the editor. Each emitter gets its own gradient back.
FooterApplyWrites the gradient to every selected emitter and closes the editor.

Every change shows on the selected emitters as it is made. Nothing is kept until Apply is pressed. Apply makes one step in Studio’s undo history.

ToDo this
Add a markerClick the bar, or the strip under it. A faint triangle follows the cursor and shows where the marker will go.
Select a markerClick it. It turns bright.
Change a marker’s colourClick the marker that is already selected. The colour picker opens, titled Stop Color.
Move a markerDrag it.
Move a marker by numberClick a middle marker, then enter Time:, from 0 to 1.
Delete a markerClick a middle marker, then press Delete.

A new marker takes the colour the gradient had at that place.

A gradient has at least 2 markers and at most 20. The limit of 20 is Roblox’s.

Invert reverses the gradient end for end. The first colour becomes the last. This differs from Invert in the graph editor, which flips a graph upside down.

Hues repairs a blend that turns dull in the middle. A straight blend between two distant hues, such as red and blue, passes through a greyish colour. Hues adds markers between the two, and the blend then travels round the colour wheel.

Hues adds nothing between two greys, or between two hues that are close. It never takes a gradient past 20 markers.

Code opens a box that holds the gradient as Roblox code, a ColorSequence, already selected. Press Ctrl+C to copy the code into a script. The code has this form:

ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 240, 170)), ColorSequenceKeypoint.new(1, Color3.fromRGB(120, 20, 0)) })

To bring a gradient in from a script, paste the code into the box and press Import. Press Close to leave the box.

The code may write its colours with Color3.fromRGB, Color3.new or Color3.fromHSV. It needs at least 2 entries.

A problem with the code shows in the hint line of the box:

Hint lineMeaning
Need at least 2 keypointsThe code holds fewer than 2 entries.
Unreadable keypointAn entry could not be read.
Unsupported Color3 constructor: and a nameA colour is written in a way other than the three above.

Two pairs of controls share one copy:

  • Copy and Paste in the header of the colour editor.
  • Copy graph and Paste graph in the menu that Shift and ⋯ opens, on colour rows and graph rows alike.

The copy holds one graph or one gradient at a time. A gradient pastes only onto a colour row. A graph pastes only onto a graph row.

To carryUse
A gradient to another emitterClipboard, or Code.
A graph to another emitterCopy and Paste in the graph editor. That copy survives a change of selection.

Reset default, in the same menu, puts the row back to the plugin’s starting value for that emitter type. On a stock ParticleEmitter it does nothing.

The colour picker sets one colour. It opens from the swatch of a colour row, from a marker in the colour editor, and from the Theme Editor. It can be dragged by its header.

ControlKindRangeWhat it does
Large squareColour areaLeft to right sets the hue. Up and down sets the saturation: vivid at the top, white at the bottom.
Side stripColour areaSets the brightness: bright at the top, black at the bottom.
Preview swatchSwatchShows the colour picked.
HueBox0 to 360The hue.
SatBox0 to 255The saturation.
ValBox0 to 255The brightness.
Red, Green, BlueBoxes0 to 255The colour as three numbers.
HexBoxThe colour as a hex code.
OKButtonKeeps the colour and closes the picker.
Cancel, XButtonsClose the picker and bring back the colour from before it opened.

The colour shows on the selected emitters while it is being picked. Opened from the swatch, OK makes one step in Studio’s undo history, and Cancel gives each emitter its own colour back.

  • At most 20 markers, at least 2.
  • The colour editor has no keyboard shortcuts.
  • The colour editor cannot be resized.
  • The shared copy does not survive a change of selection.