Is there a way to paste the color code in the color picker? #62
-
Hi there, Is there any way to paste an external color code in the color picker? For example, let's say I've got this color code "0xFF56AB32", and I want to paste color code in the color picker so that I get the same color picked (may be). Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hi, thanks for the question. Yes you can, but only on the Wheel picker page/tab, and it needs to be configured to show the color code In the code display field, that on the Wheel picker page is also an RGB code entry field, you can paste in the RGB part, so in your example "56AB32" and the Wheel controls will move to the new code, just as if you would have entered it. Before you paste you need to select the text (desktop/web double click the field) to be replace all current text with the paste operation. Pasting "56AB32" with CTRL-V on browser in Windows... I know, it is not so intuitive and actually just a side effect of the code text entry field, but it works and I use it a lot myself too. I'm planning to add support for transparency to the Wheel picker page. I will see about the possibility to handle paste action better too at the same time when I do that. I'm thinking it could be possible to make it so that if you paste a string, then if the pasted String can be parsed to a color value, it automatically moves to the Wheel page (if present in the Picker setup and if not there already), uses the parsed color value to update the Wheel picker color. That should be a bit easier to use. For the parsing of the string it will be able to handle color hex RGB strings with or without alpha and with or without the Flutter leading hex indicator "0x" or a "#" char that is typical on web color strings. |
Beta Was this translation helpful? Give feedback.
-
Since the question was answered and there even is a way to paste the color code, I'm closing the question. But I will still look into ways to improve it, as described above. |
Beta Was this translation helpful? Give feedback.
-
thanks a lot my friend for this awesome plugin and for answering my query :) |
Beta Was this translation helpful? Give feedback.
-
Just want to add that this package is the only one that accepts manual hex entry, saved my life! |
Beta Was this translation helpful? Give feedback.
-
Thanks @jaxnz glad if it is useful to others too. I needed and use the HEX RGB entry a lot myself too. 😃 |
Beta Was this translation helpful? Give feedback.
Hi, thanks for the question.
Yes you can, but only on the Wheel picker page/tab, and it needs to be configured to show the color code
showColorCode: true
.In the code display field, that on the Wheel picker page is also an RGB code entry field, you can paste in the RGB part, so in your example "56AB32" and the Wheel controls will move to the new code, just as if you would have entered it. Before you paste you need to select the text (desktop/web double click the field) to be replace all current text with the paste operation.
Pasting "56AB32" with CTRL-V on browser in Windows...
I know, it is not so intuitive and actually just a side effect of the code text entry field, but it works and …