LightweightWhiteboard:Colors

From MutigerAffe Wiki
Jump to navigation Jump to search

The color bar below the toolbar sets the color for the pen, the shapes and the fill bucket. The eraser always paints white.

Color bar

From left to right the color bar shows:

  • the current color. Click it to open the color dialog.
  • the palette with 16 fixed colors
  • My colors: your own saved colors, followed by a + button (New color...) that also opens the color dialog

Click a swatch to make it the current color. The swatch that matches the current color is highlighted. Hover over a swatch to see its hex value.

Palette

Row Colors
Grays #000000 (black), #595959, #a6a6a6, #ffffff (white)
Colors #e53935 (red), #fb8c00 (orange), #fdd835 (yellow), #43a047 (green), #00acc1 (cyan), #1e88e5 (blue), #283593 (dark blue), #8e24aa (purple), #d81b60 (pink), #6d4c41 (brown)
Light #fff59d (light yellow), #90caf9 (light blue)

The palette cannot be changed. Use My colors for your own colors.

Color dialog

The dialog Choose color opens below the swatch or button you clicked. It contains:

  • a preview of the color and a color field that opens the standard color picker of the webview
  • sliders and number fields for R, G and B, each from 0 to 255
  • a Hex field

All fields stay in sync. The hex field accepts #rrggbb and the short form #rgb. The # is optional and upper and lower case don't matter. If the value is not valid, the dialog shows Enter a hex value like #1e90ff or #19f. and the buttons Save to my colors and Use are disabled.

Button What it does
Save to my colors Adds the color to My colors and makes it the current color
Use Makes it the current color without saving it
Cancel Closes the dialog without changes

Enter works like Use. Esc closes the dialog. Clicking anywhere outside the dialog closes it as well. Keys typed in the dialog don't switch tools on the board.

My colors

Saved colors are stored in the user setting vscWhiteboard.customColors, not in the board file. They are shared by all boards in all workspaces.

  • To remove a color, click the small × on its swatch.
  • A color that is already saved is not added a second time.
  • When the setting changes, for example because you edit settings.json by hand, all open boards update their list right away.

In settings.json the colors are a list of hex values:

"vscWhiteboard.customColors": ["#1e90ff", "#ff8800"]

The extension writes values as lowercase #rrggbb. Entries it cannot read are ignored. See Commands and Settings.

Picking a color from the board

The Pick color tool (I) takes the color of a pixel on the board. See Drawing Tools.

Lightweight Whiteboard
Start Installation · Getting Started
Features Drawing Tools · Colors · Images · Zoom and Pan · Files and Saving
Reference Commands and Settings · FAQ and Troubleshooting · Version History
Links Project page on mutigeraffe.com · Download on the VS Code Marketplace