-
Notifications
You must be signed in to change notification settings - Fork 949
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
Add ability to remove tab color #1166
Comments
Hi this is a good feature, would you like to open a PR to add that feature to the method The approach I would take, to match similar behavior with other methods would be to create a new method dedicated to clearing the tab color, that accepts no arguments and set the tab color to let me know if you wish to participate to the project or if I should do it. |
Happy to update the method, but am unfamiliar with how the testing works. Do I use my real credentials and make a real google spreadsheet? Where should that spreadsheet live permanently, i.e., what happens if I delete it? Sorry, I haven't contributed to an open source project before. |
The testing can work offline for any already existent test. When adding a new test you can follow the procedure here: https://github.com/burnash/gspread/blob/master/.github/CONTRIBUTING.md You will be required to use your service account credentials file, and you should use the option In any case you can see any new files created by the test framework under the folder Feel free to come back here if you have any more questions |
Ok I'll give it a shot |
It would be nice to update
Worksheet.update_tab_color()
to acceptNone
as a value, which would then unset the color in Google.In #1095, a method to retrieve and set the color of a tab was added. However, the
update_tab_color()
method does not support removing the color. It's not well documented in Google's docs, but after some poking around, it appears that if you set the value toNone
, it unsets the color. Setting to an empty dict{}
sets the color to black (i.e., seems to imply{ 'red': 0, 'green': 0, 'blue': 0 }
).The following code works for me, which I am doing in the meantime:
Incidentally, it looks like the issue with the Google API described in the original ticket #996 has been fixed by Google. So the method could also be updated to remove the deprecated
tabColor
. https://issuetracker.google.com/issues/236109669The text was updated successfully, but these errors were encountered: