-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
return rgb #33
Comments
Hi @giorg, I'm not sure I understand your request. You'd like to store the data as |
Hi, color = RGBColorField(null=True, blank=True) then when in the admin I choose a color it is saved in my color field as hexadecimal. Is it possible to store it as "45,21,34" for example? thanks a lot |
I think it would require some work but It could be possible. If you're interested on working a patch that adds a |
Is there still interest in making RGB values an option? If so, the best option might be to use a different jQuery color picker. Looking through the code I found this block. The current picker is converting all RGB values to hex. A picker like this would provide the option to use many different color formats. The issue would be whether or not changing the color picker could be done in a non-breaking way. I'd be willing to attempt these changes if there's any interest with such a change? |
@smarlowucf a patch is welcome but I believe the requested feature was to make the |
Okay, the initial question made me think rgb stored as a string rgb(1,2,3) rather than a tuple (1,2,3). Migrating to a new jQuery color picker will likely cause some major functionality changes that may be unwanted. The current picker displays a set of colors to be chosen, whereas other pickers I've found provide a palette of colors to choose from. So no input of a colors list would be needed. Also, CSS expects color formats as strings so sticking to that format seems like an easier option if the color field value is used on the frontend. http://www.w3schools.com/cssref/css_colors_legal.asp In either case it seems like choosing a JS color picker that supports the wanted color formats is a better option than converting the format on the backend. However, if a color list is wanted the picker I suggested above is not a good option. |
If someone does undertake this work, please consider offering both RGB and RGBA values (with or without alpha). |
Hi,
is it possible to have rgb code instead of hex in return?
thanks
The text was updated successfully, but these errors were encountered: