I was looking for a way to preview the selected color in a flat colorpicker. Using the background of the text input gives a nice area for the preview without increasing the colorpicker footprint. I included an "isDark" test function to ensure that a contrasting text color is used.
I was looking for a way to preview the selected color in a flat colorpicker. Using the background of the text input gives a nice area for the preview without increasing the colorpicker footprint. I included an "isDark" test function to ensure that a contrasting text color is used.