nielssp / colorgrab

A cross-platform color picker
MIT License
102 stars 9 forks source link

Nearest WEB color #9

Open bigvax opened 6 years ago

bigvax commented 6 years ago

Hi! Thank you for your useful tool. This Color Picker is much more convenient than other similar programs for Linux.

But, I would like an additional feature - a field with the closest color from the web palette. Approximately as it is made in EYE3 for Windows. eye3colorpicker-screen

Thanks in advance and WBR. Max

bigvax commented 6 years ago

example function for this feature:

function getNearestWebSafeColor(r, g, b) { r = int(round(( r / 255) 5 ) 51); g = int(round(( g / 255) 5 ) 51); b = int(round(( b / 255) 5 ) 51); return (r, g, b); }

nielssp commented 6 years ago

Instead of a separate text field, could it just be an alternative output-mode? (i.e. available in the Settings -> Color Output menu)