Skip to content

Get screen pixel color #259

Closed
Closed
@Midwaey

Description

@Midwaey

(Feature Request)
In RobotJS you can get the color of a pixel at a given position.

`
const robot = require("robotjs"),
mouse = robot.getMousePos();

let hex = robot.getPixelColor(mouse.x, mouse.y);
`

A similar feature would be very useful here, you could input given coordinates and it would output a hex of that pixels color by default, or you could specify a color format like rgb, html, cmyk, etc.

A optional part of this would be to specify how big of a region from the original coordinates to output a map of.
screen.getPixelColors(mouse.x, mouse.y, 2, 2)
This would output a table of colors for 3x3 pixels based on the mouse position.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions