mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-25 11:51:05 +01:00
Part of #978: Show Opacity in the Color Wheel panel sets the opacity of the fill or stroke
The Color Wheel panel menu gets Show Opacity, kept with the preferences
(`ui.colorWheel {opacity}`). It adds a row under the wheel or the box with
a slider and a percent field. The row sets the opacity of the fill or
stroke item, the selected gradient stop or the selected freeform point
(the first stop or point when none is selected, as for a color pick), and
a drag is one undo step. The row is gray with nothing selected, for an
object selected in a symbol instance, and when the fill or stroke item it
would set is on type characters or missing.
- paint.setFill and paint.setStroke take `opacity` (a percentage, 0 to
100), with or without a new paint. An opacity that no target takes is
an error and leaves the paint undone too. paint.proxies answers
`fillOpacity` and `strokeOpacity` from the first row the command would
edit. A graph series keeps the opacity on regeneration.
- The opacity slider and the swatch chips draw the same checkerboard.
- New error and menu strings have rows in the catalogs.
Docs: docs/mcp.md, docs/control-protocol.md, docs/target-app-parity.md.
This commit is contained in:
1 parent
22b8c6ce5a
commit
4f065ccbbf
46 files changed
+1227
-110
No files matched your search
@@ -265,9 +265,10 @@ My Themes tab lists the saved themes; every action runs a command (`colorTheme.s
|
||||
Color Wheel panel (`window.panel {panel: "colorWheel"}`): a hue ring around a saturation and brightness square. A
|
||||
pick runs the commands the Color panel's sliders run: `paint.setFill` or `paint.setStroke` with `keepModel`,
|
||||
`paint.editGradient` for a gradient's selected stop, and `paint.freeform.setPoint` for a freeform gradient's selected
|
||||
point (the first stop or point when none is selected). `ui.colorWheel {view?, channel?}` shows the wheel or the box (a
|
||||
color field with a channel strip at its right) and picks the box's channel; it returns the settings, and `ui.inspect`
|
||||
reports them as `ui.color_wheel`.
|
||||
point (the first stop or point when none is selected). `ui.colorWheel {view?, channel?, opacity?}` shows the wheel or
|
||||
the box (a color field with a channel strip at its right), picks the box's channel and checks or unchecks Show Opacity
|
||||
(an opacity row under the wheel or the box); it returns the settings, and `ui.inspect` reports them as
|
||||
`ui.color_wheel`.
|
||||
|
||||
Edit Colors dialogs: `ui.colorBalanceDialog` opens Adjust Colors (`colorBalance`: fields `mode` `gray`/`rgb`/`cmyk`/
|
||||
`global`, the channels `r` `g` `b` / `c` `m` `y` `k` / `gray` / `tint` (global mode) from −100 to 100, `convert`, `fill`, `stroke`,
|
||||
|
||||
+13
-4
@@ -622,9 +622,13 @@ RGB fields in percent, as a double-click right of an RGB field does, and `false`
|
||||
and answers true when the fields show in percent.
|
||||
`ui.colorWheel {"view": "box", "channel": "red"}` shows the Color Wheel panel's box (a color field with the channel's
|
||||
strip at its right) in place of the wheel, as the panel menu's Box View and Box Channel do, and `"view": "wheel"`
|
||||
shows the wheel again. Keys left out keep their values. Params that are not an object, another key or a value off
|
||||
the list return an error and change nothing. The command returns `{view, channel}`, and both settings are kept with
|
||||
the preferences.
|
||||
shows the wheel again. `"opacity": true` checks Show Opacity, as the panel menu does: a row under the wheel or the
|
||||
box with a slider and a percent field sets the opacity of the fill or stroke row (`paint.setFill {opacity}`), the
|
||||
selected gradient stop or the selected freeform point (the first stop or point when none is selected), and `false`
|
||||
hides the row. The row is gray with nothing selected, for an object selected in a symbol instance, and when the fill
|
||||
or stroke row it would set is on type characters or missing. Keys left out keep their values.
|
||||
Params that are not an object, another key or a value off the list return an error and change nothing. The command
|
||||
returns `{view, channel, opacity}`, and the settings are kept with the preferences.
|
||||
|
||||
In remote desktop mode, `invoke_menu` with `{"command":"ui.sampleScreenColor","params":{}}` shows the system's
|
||||
screen color sampler and returns `null` before a color is picked: the system's sampler on macOS, the XDG desktop
|
||||
@@ -756,7 +760,12 @@ Cmd+Alt+/ runs `appearance.addStroke` (`press_key {key: "/", mods: {cmd: true, a
|
||||
`item` to edit one of them; `run_command appearance.setActiveItem {"index": n}` makes that row the target of later
|
||||
calls that omit `item` (as clicking the row in the Appearance panel does) until the selection changes; the proxy of
|
||||
its kind (`paint.proxies`) and the Gradient tool's annotator then show that row.
|
||||
`inspect_document` reports it as `paint.appearanceItem`. Live effects take the same `item` to apply to one fill or
|
||||
`inspect_document` reports it as `paint.appearanceItem`. `paint.setFill` and `paint.setStroke` also take `opacity`
|
||||
(0 to 100, a percentage as in `transparency.set`), which sets the opacity of the fill or stroke row they paint, with
|
||||
or without a new paint, as one undo step. An opacity that no target takes is an error and also leaves the paint
|
||||
undone. `paint.proxies` answers it as `fillOpacity` and `strokeOpacity`, from the first selected object that has
|
||||
that row. It answers null with nothing selected, for an object selected in a symbol instance, and when only type
|
||||
characters (which have no opacity of their own) or objects without that row are selected. Live effects take the same `item` to apply to one fill or
|
||||
stroke instead of the whole object: `run_command effect.apply {"effect": "path.offsetPath", "item": 0}`, and
|
||||
`effect.remove`, `effect.setParams` (`visible` toggles one) and `effect.duplicate` address that item's effects;
|
||||
`apply_effect` uses the active item. `effect.list` reports each object's item effects under `applied[].items`.
|
||||
|
||||
@@ -1503,6 +1503,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- **Missing library files:** a persistent swatch or graphic style library panel whose file is gone at startup reopens and stays in the preferences, showing the file's path with Locate Library… (`ui.libraryPanel.locate`), which reads the file from where it is now into the same panel.
|
||||
- **Swatch library and Recolor Artwork parameters:** the `swatch.library.*` commands, `swatch.resetDefaults`, the graphic style library save, load and add, the `recolor.*` commands and `color.harmony`'s `limitTo` refuse parameters of the wrong form, such as `names: "Grays"`, `limitTo: 5` or `includeImages: "false"`. Errors name the parameter, except that a `limitTo` that is not a string, such as `5`, gets an unknown-library error. A `null` counts as left out except for `recolor.apply`'s `model`, which must be a string when given.
|
||||
- **Color Wheel panel (part of #978):** Window › Color Wheel shows the Fill and Stroke proxy beside a hue ring around a square with saturation across and brightness up. It edits what the Color panel's sliders edit (the active proxy's color, the selected gradient stop or freeform point) through the same paint commands, and a drag is one undo step. Alt paints the other proxy, and Shift steps the ring by 45°. A pick goes from display sRGB into the working RGB space; an RGB, CMYK or Lab color keeps its model, and a Gray color or a tint of a global swatch becomes a process color in the document's color mode. A click gives the ring or the square the keyboard focus, and the arrow keys then step the color; both report their names and values to screen readers, and the Color Picker's color field takes the same keys. The panel menu's Box View puts a box in the wheel's place: a color field with a channel strip at its right for Hue, Saturation, Brightness, Red, Green or Blue (Box Channel), on the Color Picker's axes, kept with the preferences (`ui.colorWheel`); the strip and the Color Picker's channel slider take the arrow keys after a click. Scores and estimates are unchanged.
|
||||
VectorCraft's own Show Opacity in the Color Wheel panel menu (part of #978) adds a slider and a percent field that set the opacity of what the wheel edits: the fill or stroke row (`paint.setFill {opacity}`; fill and stroke opacity can differ, as [Apply transparency to artwork](https://helpx.adobe.com/illustrator/desktop/manage-colors/apply-transparency-and-blending/apply-transparency-to-artwork.html) describes), the selected gradient stop or the selected freeform point (the first one when none is selected). The row is gray with nothing selected, for an object selected in a symbol instance, and when the fill or stroke row it would set is on type characters or missing. Scores and estimates are unchanged.
|
||||
- **Colour:** a Color Picker (colour field, H/S/B/R/G/B channel slider, HSB/RGB/Lab/CMYK fields, hex, web-only snapping, out-of-gamut correction); the Color panel shows a selected colour in its own model and, with nothing selected, the new-art defaults in the mode picked last, which it keeps between sessions; Alt-click paints the other proxy; proxies look through groups and show "?" for mixed paint; Invert, Complement, Apply Last Color (`,`) and Apply Last Gradient (`.`) keep the colour model; every paint command feeds the recent colours. The Color Guide has 21 harmony rules, Steps and Variation options and Limit to Library. Adjust Color Balance (its Global mode shifts tints) and Saturate preview live; Edit Colors and Recolor also reach meshes, images and patterns. Recolor Artwork has colour reduction, five recolour methods, presets, Limit to Library, a colour-wheel Edit tab and Edit Color Group; a local Color Themes panel saves five-colour themes. Fill/Stroke chips open swatch and mixer popovers (the Properties panel has the Control bar's Fill and Stroke chips, Stroke link and weight spinner, with nothing selected too), panels have Illustrator's Window menu keys (Align Shift+F7, Transform Shift+F8, Pathfinder Cmd+Shift+F9, Layers F7, Character Cmd+T…; every panel can be given one in Edit › Keyboard Shortcuts), and Eyedropper Options pick up and apply chosen attributes (Alt and Shift+Alt, image pixels). An ICC CMYK profile converts straight into the RGB working space (not through sRGB, so a wider space such as Wide Gamut RGB keeps colours sRGB can't hold) with the colour settings' black-point compensation, on the canvas and in RGB exports alike (the built-in Generic CMYK compensates both ways, so RGB black separated to a rich black displays as black again). Fills and strokes can overprint (Attributes panel, Overprint Black options), and CMYK documents blend in inks on screen, in PDF and when flattening. Document Color Mode converts the art, symbols, pattern tiles and swatches through the colour settings: Gray stays Gray, RGB grays separate into light grays in cyan, magenta and yellow only, darker four-color grays and a rich black, or go on the black plate only with `grays: "black"` (also for `document.open {colorMode}`).
|
||||
Plain Comma and Period, and also Shift+Comma and Shift+Period, apply the last solid color and the last gradient to the active Fill or Stroke proxy in VectorCraft ([Default keyboard shortcuts](https://web.archive.org/web/20260726060015/https://helpx.adobe.com/illustrator/using/default-keyboard-shortcuts.html), "Select color fill mode" and "Select gradient fill mode").
|
||||
Recent Colors keeps the last 30 solid colors applied, newest first and each once, and the list stays the same when another document is opened or made active; a 31st color drops the oldest ([Select colors using the Color panel](https://helpx.adobe.com/illustrator/desktop/manage-colors/select-and-adjust-colors/select-colors-using-the-color-panel.html)). The list lasts for the session. In the Color and Swatches panels the chips wrap onto further rows when the panel is too narrow for one row (`paint.recent`). Tests: `recent_colors_keep_thirty_colors_across_documents` in `crates/engine/src/tests/paintproxy.rs`, `all_thirty_recent_colors_wrap_into_a_narrow_panel` in `crates/ui-egui/src/panels/color/tests.rs`.
|
||||
|
||||
Reference in new issue
Block a user