+
+ Color Utility
+
+
+
+
+
+
+ {mode === 'convert' ? (
+ <>
+
+
+ setInput(event.target.value)}
+ placeholder="e.g. #6366f1, rgb(99, 102, 241), hsl(230, 86%, 60%)"
+ className="w-full px-3 py-2 text-sm font-mono bg-white dark:bg-[#0d1117] border border-gray-300 dark:border-[#30363d] rounded focus:outline-none focus:ring-2 focus:ring-blue-500 text-gray-900 dark:text-[#c9d1d9]"
+ />
+
+
+
+
+ {parsedColor ? `Detected: ${parsedColor.format}` : 'Paste a color to detect its format.'}
+
+
+ {conversionError && (
+
+ {conversionError}
+
+ )}
+ >
+ ) : (
+ <>
+
+
+
+
setPickerColor(event.target.value)}
+ className="h-10 w-14 rounded border border-gray-200 dark:border-[#30363d] bg-white dark:bg-[#0d1117] cursor-pointer"
+ />
+
+
+ Selected HEX
+
+
+ {pickerColor.toUpperCase()}
+
+
+
+
+ >
+ )}
+