Feature Spec Tool: Sampler - adobe-photoshop/spaces-design GitHub Wiki

Canvas Interactions

  • Sampler tool is used to sample attributes of a clicked on layer to the selected layer(s).
  • All selected layers should have a magenta highlight, while the hovered on layer that is sample-able should have a blue highlight.
  • Left clicking a layer should sample the clicked on layer's primary color to all the selected layers.
Selected Layer Kind Clicked Layer Kind Sample Action
Shape Shape Fill Color => Fill Color
Shape Type Text Color => Fill Color
Shape Others Color at clicked point => Fill Color
Type Shape Fill Color => Text Color
Type Type Text Color => Text Color
Type Others Color at clicked point => Text Color
Others * No-op
  • Shift + clicking a layer will copy all the effects on that layer to the selected layers.
  • Pressing Space bar on a blue highlighted layer should bring up the Sampler HUD, showing all available attributes that can be sampled for that layer:
    • Type color, shape fill color, pixel color of the clicked spot
    • Shape stroke color / stroke properties
    • If all selected layers are type layers, and clicked layer is type, user should be able to sample the type style (including Typeface, Size, Alignment, etc).
    • Layer effects, if clicked layer has none, will remove effects of selected layers to match the "none" state of the sampled layer.
    • If clicked layer is a smart object, and all selected layers are smart object, the sampled smart object's graphic and type (embedded, linked, library linked) will be applied to the selected smart object layers.