MCPcopy
hub / github.com/burnash/gspread / clear_tab_color

Method clear_tab_color

gspread/worksheet.py:1650–1671  ·  view source on GitHub ↗

Clears the worksheet's tab color. Use update_tab_color() to set the color.

(self)

Source from the content-addressed store, hash-verified

1648 return response
1649
1650 def clear_tab_color(self) -> JSONResponse:
1651 """Clears the worksheet's tab color.
1652 Use update_tab_color() to set the color.
1653 """
1654 body = {
1655 "requests": [
1656 {
1657 "updateSheetProperties": {
1658 "properties": {
1659 "sheetId": self.id,
1660 "tabColorStyle": {
1661 "rgbColor": None,
1662 },
1663 },
1664 "fields": "tabColorStyle",
1665 },
1666 },
1667 ],
1668 }
1669 response = self.client.batch_update(self.spreadsheet_id, body)
1670 self._properties.pop("tabColorStyle")
1671 return response
1672
1673 def update_index(self, index: int) -> JSONResponse:
1674 """Updates the ``index`` property for the worksheet.

Callers 1

test_clear_tab_colorMethod · 0.80

Calls 1

batch_updateMethod · 0.45

Tested by 1

test_clear_tab_colorMethod · 0.64