You could make a slice and then export the slice to a buffer. From that buffer you could then read each of the pixel values. Something like this:
let sketch = require('sketch')
let Slice = sketch.Slice
let Rectangle = sketch.Rectangle
let exportLayer = new Slice({
parent: ...,
frame: new Rectangle(0,0,400,400)
})
const options = { formats: 'png', output: false }
const data = sketch.export(exportLayer, options).toNSData()
let imageRep = NSBitmapImageRep.imageRepWithData(data)
let color = imageRep.colorAtX_y(1,2)
console.log(MSColor.colorWithNSColor(color).CSSAttributeString())