mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-23 10:53:35 +01:00
Merge pull request #6943 from dotCooCoo/feat/color-rgb-percent
Color: a double-click right of an RGB field switches between percent and 0 to 255
This commit is contained in:
36 files changed
+362
-24
No files matched your search
@@ -238,15 +238,22 @@ Edit or Apply Colors runs `ui.recolorDialog {colors, library?}` with the harmony
|
||||
recolours as usual; with nothing selected the colours themselves are the rows and `ui.dialog.confirm` saves them as a
|
||||
new colour group (`swatch.newGroup`, named by the `groupName` field).
|
||||
|
||||
Color panel options: `ui.colorPanel {mode?, options?, recentColors?}` picks the panel's mode as its panel menu does
|
||||
(`grayscale`, `rgb`, `hsb`, `cmyk` or `websafe`; the active color converts to the mode's model as one undo step),
|
||||
shows (`options: true`) or hides (`false`) the options, and checks (`recentColors: true`) or unchecks (`false`) Show
|
||||
Recent Colors, which shows or hides the panel's Recent Colors row. Applied colors still join the list while the row
|
||||
is hidden, and the Swatches panel keeps its own row. It answers `{mode, options, recentColors, shown}`: `mode` is null
|
||||
until a mode is picked, and `shown` is the mode the panel shows the color in, or `tint` for a tint of a global or spot
|
||||
swatch. Another mode, `lab` included, answers an error, as does an `options` or `recentColors` value that is not true
|
||||
or false. The desktop app keeps the three settings with its preferences, and `ui.inspect` reports them as
|
||||
`ui.color_mode`, `ui.color_hide_options` and `ui.color_show_recent_colors`.
|
||||
Color panel options: `ui.colorPanel {mode?, options?, recentColors?, rgbPercent?}` picks the panel's mode as its
|
||||
panel menu does (`grayscale`, `rgb`, `hsb`, `cmyk` or `websafe`; the active color converts to the mode's model as one
|
||||
undo step), shows (`options: true`) or hides (`false`) the options, and checks (`recentColors: true`) or unchecks
|
||||
(`false`) Show Recent Colors, which shows or hides the panel's Recent Colors row. Applied colors still join the list
|
||||
while the row is hidden, and the Swatches panel keeps its own row. `rgbPercent: true` shows the RGB mode's R, G and B
|
||||
in percent and `false` shows them from 0 to 255, as a double-click right of an RGB field switches them; the color does
|
||||
not change, and Web Safe RGB and the hex field stay in 0 to 255. The color mixer in the popovers of the Fill and
|
||||
Stroke chips (Control bar and Properties panel) and the gradient stop dialog show the Color panel's rows and follow
|
||||
the same setting. It answers `{mode, options, recentColors, rgbPercent,
|
||||
shown}`: `mode` is null until a mode is picked, and `shown` is the mode the panel shows the color in, or `tint` for a
|
||||
tint of a global or spot swatch. Another mode, `lab` included, answers an error, as does an `options`, `recentColors`
|
||||
or `rgbPercent` value that is not true or false. The desktop app keeps the four settings with its preferences, and
|
||||
`ui.inspect` reports them as `ui.color_mode`, `ui.color_hide_options`, `ui.color_show_recent_colors` and
|
||||
`ui.color_rgb_percent`. `ui.colorRgbPercent {}` (Toggle RGB Percent in the command palette and Keyboard Shortcuts)
|
||||
switches R, G and B between percent and 0 to 255 and answers true when they show in percent; a parameter answers an
|
||||
error and changes nothing.
|
||||
|
||||
Color Themes panel (`window.panel {panel: "colorThemes"}`): its Create tab makes a theme on a harmony wheel and its
|
||||
My Themes tab lists the saved themes; every action runs a command (`colorTheme.save`, `colorTheme.delete`,
|
||||
|
||||
Reference in new issue
Block a user