You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a color picker mode that samples the pixel color under the cursor and drops an annotation with hex and RGB values.
Use case
Quick color checks during UI validation: "Is this the right brand color?", "Do these two elements use the same color?". Keeps the tool in-scope as a screen measurement utility — color is just another property to measure.
Interaction
User selects color picker mode (keyboard shortcut, e.g. 5).
Cursor shows a small live preview swatch of the color under the pointer.
Click places a color annotation at that point.
The annotation displays:
A color swatch (small filled rectangle)
Hex value: #FF5722
RGB value: rgb(255, 87, 34)
Implementation notes
The screenshot QImage is already available in RulerBackend. Use QImage.pixelColor(x, y) to sample.
Expose a @pyqtSlot like sampleColorAtPoint(x, y) returning hex/RGB strings (or a structured object).
QML: small swatch rectangle + text label, positioned near cursor. Reuse MeasurementLabel layout patterns.
Summary
Add a color picker mode that samples the pixel color under the cursor and drops an annotation with hex and RGB values.
Use case
Quick color checks during UI validation: "Is this the right brand color?", "Do these two elements use the same color?". Keeps the tool in-scope as a screen measurement utility — color is just another property to measure.
Interaction
5).#FF5722rgb(255, 87, 34)Implementation notes
QImageis already available inRulerBackend. UseQImage.pixelColor(x, y)to sample.@pyqtSlotlikesampleColorAtPoint(x, y)returning hex/RGB strings (or a structured object).MeasurementLabellayout patterns.Future extensions (out of scope for this issue)