Open sraboy opened 9 years ago
Just notes to myself (though, @Olreich, if you're up to it, feel free to dig in).
See the SkaaColorChooser control in the SkaaEditorControls. It's derived from the ColorGrid in the Cyotek.Windows.Forms.ColorPicker project.
The problem is that the color picker, by default, allows selecting any color based on anything you hover over anywhere on the screen. It should be limited to the current color palette. Whether this could/should be done by simple disabling the tool once you move the mouse outside the window or just not recognizing other colors, I don't know.
I guess you could compute the nearest matching color in the palette. But, like you said, it probably makes more sense to restrict it to the (sprite) window.
It's hard to identify colors in use without a color-picker/dropper tool. This is something that exists in the SkaaColorChooser (derived from ColorGrid) but hasn't been implemented yet.