Excel Temaları ve Renkler

Excel’de Tema Uygulama ve Oluşturma

Belge temaları, Excel belgelerinin renklerini, yazı tiplerini ve grafik biçimlendirme efektlerini kolayca koordine etmenizi ve bunları hızlı bir şekilde güncellemenizi sağlar. Temalar, bir çalışma kitabında kullanılan adlandırılmış stiller, grafik efektleri ve diğer nesneler ile birleştirilmiş bir görünüm sunar. Örneğin, Accent1 stili, Ofis ve Apex temalarında farklı görünür. Genellikle, bir belge teması uygular ve ardından istediğiniz şekilde değiştirirsiniz.

Excel’de Bir Renk Şeması Nasıl Uygulanır

  1. Excel’i açın ve Excel menü şeridinde “Sayfa Düzeni” sekmesine gidin.
  2. “Temalar” bölümündeki “Renkler” düğmesine tıklayın.
  3. Gereksinimlerinize uygun bir renk paleti seçin veya canlı bir önizleme görmek için şema üzerinde gezdirin.

Excel’de Özel Renk Şeması Nasıl Oluşturulur

Belgenize taze, benzersiz bir görünüm vermek veya kuruluşunuzun marka standartlarına uygun olmak için kendi renk setinizi oluşturabilirsiniz.

  1. Excel’i açın ve Excel menü şeridinde “Sayfa Düzeni” sekmesine gidin.

  2. “Temalar” bölümündeki “Renkler” düğmesine tıklayın.

  3. “Renkleri Özelleştir…” düğmesine tıklayın.

  4. “Yeni Tema Renkleri Oluştur” iletişim kutusunda, her bir öğe için renk seçmek için yanlarındaki renk açılır listelerine tıklayabilirsiniz. Renkleri paletten seçebilir veya “Daha Fazla Renkler” seçeneğini kullanarak özel renkler tanımlayabilirsiniz.

  5. Tüm istenen renkleri seçtikten sonra, özel renk şemanıza bir ad sağlamak için “Ad” alanına bir ad girin.

  6. Özel renk şemanızı kaydetmek için “Kaydet” düğmesine tıklayın. Özel renk şemanız artık gelecekte kullanılmak üzere “Renkler” açılır menüsünde mevcut olacaktır.

Aspose.Cells for Python via .NET’de Renk Şeması Oluşturma ve Uygulama

Aspose.Cells for Python via .NET, temalar ve renkler özelleştirme özellikleri sunar.

Aspose.Cells for Python via .NET’de Özelleştirilmiş Renk Teması Nasıl Oluşturulur

Dosyada tema renkleri kullanılıyorsa, her bir hücreyi ayrı ayrı değiştirmemize gerek yok, sadece temadaki renkleri değiştirmemiz yeterlidir.

Aşağıdaki örnek, istediğiniz renklerle özel temaları nasıl uygulayacağınızı gösterir. Microsoft Excel 2007’de manuel olarak oluşturulmuş bir örnek şablon dosyası kullanıyoruz.

Aşağıdaki örnek, bir şablon XLSX dosyası yükler, farklı tema renk tipleri için renkleri tanımlar, özel renkleri uygular ve Excel dosyasını kaydeder.

from aspose.cells import Workbook,License,PdfSaveOptions, LoadOptions, LoadFormat, LoadFilter, LoadDataFilterOptions, PasteOptions,PasteType
from aspose.pydrawing import Color
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
# The path to the documents directory.
dataDir = RunExamples.GetDataDir(".")
# Instantiate Workbook object.
# Open an exiting excel file.
workbook = Workbook(dataDir + "book1.xlsx")
# Define Color array (of 12 colors) for Theme.
colors = []
colors.append(Color.from_argb(255, 250, 235, 215)) # Background1
colors.append(Color.from_argb(255, 165, 42, 42)) # Text1
colors.append(Color.from_argb(255, 240, 248, 255)) # Background2
colors.append(Color.from_argb(255, 255, 255, 0)) # Text2
colors.append(Color.from_argb(255, 154, 205, 50)) # Accent1
colors.append(Color.from_argb(255, 255, 0, 0)) # Accent2
colors.append(Color.from_argb(255, 255, 192, 203)) # Accent3
colors.append(Color.from_argb(255, 128, 0, 128)) # Accent4
colors.append(Color.from_argb(255, 152, 251, 152)) # Accent5
colors.append(Color.from_argb(255, 255, 165, 0)) # Accent6
colors.append(Color.from_argb(255, 0, 128, 0)) # Hyperlink
colors.append(Color.from_argb(255, 128, 128, 128)) # Followed Hyperlink
# Set the custom theme with specified colors.
workbook.custom_theme("CustomeTheme1", colors)
# Save as the excel file.
workbook.save(dataDir + "output.out.xlsx")

Aspose.Cells for Python via .NET’de Tema Renkleri Nasıl Uygulanır

Aşağıdaki örnek, bir hücrenin ön planı ve yazı tipi renklerini (çalışbook’un varsayılan temasına göre) uygular. Ayrıca Excel dosyasını diske kaydeder.

from aspose.cells import BackgroundType, ThemeColor, ThemeColorType, Workbook
from os import os, path
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
# The path to the documents directory.
dataDir = RunExamples.GetDataDir(".")
# Create directory if it is not already present.
IsExists = path.isdir(dataDir)
if notIsExists:
os.makedirs(dataDir)
# Instantiate a Workbook.
workbook = Workbook()
# Get cells collection in the first (default) worksheet.
cells = workbook.worksheets[0].cells
# Get the D3 cell.
c = cells.get("D3")
# Get the style of the cell.
s = c.get_style()
# Set foreground color for the cell from the default theme Accent2 color.
s.foreground_theme_color = ThemeColor(ThemeColorType.ACCENT2, 0.5)
# Set the pattern type.
s.pattern = BackgroundType.SOLID
# Get the font for the style.
f = s.font
# Set the theme color.
f.theme_color = ThemeColor(ThemeColorType.ACCENT4, 0.1)
# Apply style.
c.set_style(s)
# Put a value.
c.put_value("Testing1")
# Save the excel file.
workbook.save(dataDir + "output.out.xlsx")

Aspose.Cells for Python via .NET’de Tema Renkleri Nasıl Alınır ve Ayarlanır

Aşağıda temalı renkleri uygulayan ve ayarlayan birkaç yöntem ve özellik bulunmaktadır.

Aşağıdaki örnek, temalı renkleri almanın ve ayarlamanın nasıl yapılacağını gösterir.

Aşağıdaki örnek, bir şablon XLSX dosyası kullanır, farklı tema renk tipleri için renkleri alır, renkleri değiştirir ve Microsoft Excel dosyasını kaydeder.

from aspose.cells import ThemeColorType, Workbook
from aspose.pydrawing import Color
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
# The path to the documents directory.
dataDir = RunExamples.GetDataDir(".")
# Instantiate Workbook object.
# Open an exiting excel file.
workbook = Workbook(dataDir + "book1.xlsx")
# Get the Background1 theme color.
c = workbook.get_theme_color(ThemeColorType.BACKGROUND1)
# Print the color.
print("theme color Background1: " + str(c))
# Get the Accent2 theme color.
c = workbook.get_theme_color(ThemeColorType.ACCENT2)
# Print the color.
print("theme color Accent2: " + str(c))
# Change the Background1 theme color.
workbook.set_theme_color(ThemeColorType.BACKGROUND1, Color.red)
# Get the updated Background1 theme color.
c = workbook.get_theme_color(ThemeColorType.BACKGROUND1)
# Print the updated color for confirmation.
print("theme color Background1 changed to: " + str(c))
# Change the Accent2 theme color.
workbook.set_theme_color(ThemeColorType.ACCENT2, Color.blue)
# Get the updated Accent2 theme color.
c = workbook.get_theme_color(ThemeColorType.ACCENT2)
# Print the updated color for confirmation.
print("theme color Accent2 changed to: " + str(c))
# Save the updated file.
workbook.save(dataDir + "output.out.xlsx")

Gelişmiş Konular