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, kitapçıkta kullanılan isimlendirilmiş stiller, grafik efektleri ve diğer nesnelerle birleşik bir görünüm sağlar. Örneğin, Accent1 stili Office ve Apex temalarında farklı görünür. Sıkça, bir belge teması uygular ve ardından istediğiniz gibi 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’te Renk Şeması Oluşturma ve Uygulama

Aspose.Cells, temaları ve renkleri özelleştirmek için özellikler sağlar.

Aspose.Cells’te Özel Renk Teması Nasıl Oluşturulur

Eğer dosyada tema renkleri kullanıldıysa, her hücreyi ayrı ayrı değiştirmemize gerek kalmaz; temanın renklerini değiştiririz.

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ını yükler, farklı tema renk türleri için renkleri tanımlar, özelleştirilmiş renkleri uygular ve Excel dosyasını kaydeder.

const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "book1.xlsx");
// Define Color array (of 12 colors) for Theme.
const carr = [
new AsposeCells.Color("AntiqueWhite"), // Background1
new AsposeCells.Color("Brown"), // Text1
new AsposeCells.Color("AliceBlue"), // Background2
new AsposeCells.Color("Yellow"), // Text2
new AsposeCells.Color("YellowGreen"), // Accent1
new AsposeCells.Color("Red"), // Accent2
new AsposeCells.Color("Pink"), // Accent3
new AsposeCells.Color("Purple"), // Accent4
new AsposeCells.Color("PaleGreen"), // Accent5
new AsposeCells.Color("Orange"), // Accent6
new AsposeCells.Color("Green"), // Hyperlink
new AsposeCells.Color("Gray") // Followed Hyperlink
];
// Instantiate a Workbook.
// Open the template file.
const workbook = new AsposeCells.Workbook(filePath);
// Set the custom theme with specified colors.
workbook.customTheme("CustomeTheme1", carr);
// Save as the excel file.
workbook.save(path.join(dataDir, "output.out.xlsx"));

Aspose.Cells’te Tema Renklerinin Uygulanması

Aşağıdaki örnek, bir hücrenin ön plan ve yazı tipi renklerini varsayılan tema renk türlerine göre uygular. Ayrıca, Excel dosyasını diske kaydeder.

const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
// Create directory if it is not already present.
if (!require("fs").existsSync(dataDir)) {
require("fs").mkdirSync(dataDir);
}
// Instantiate a Workbook.
const workbook = new AsposeCells.Workbook();
// Get cells collection in the first (default) worksheet.
const cells = workbook.getWorksheets().get(0).getCells();
// Get the D3 cell.
const c = cells.get("D3");
// Get the style of the cell.
const s = c.getStyle();
// Set foreground color for the cell from the default theme Accent2 color.
s.setForegroundThemeColor(new AsposeCells.ThemeColor(AsposeCells.ThemeColorType.Accent2, 0.5));
// Set the pattern type.
s.setPattern(AsposeCells.BackgroundType.Solid);
// Get the font for the style.
const f = s.getFont();
// Set the theme color.
f.setThemeColor(new AsposeCells.ThemeColor(AsposeCells.ThemeColorType.Accent4, 0.1));
// Apply style.
c.setStyle(s);
// Put a value.
c.putValue("Testing1");
// Save the excel file.
workbook.save(path.join(dataDir, "output.out.xlsx"));

Aspose.Cells’te Tema Renklerinin Alınması ve Ayarlanması

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, şablon XLSX dosyasını kullanır, farklı tema renkleri için renkleri alır, renkleri değiştirir ve Microsoft Excel dosyasını kaydeder.

const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "book1.xlsx");
// Instantiate Workbook object.
// Open an existing excel file.
const workbook = new AsposeCells.Workbook(filePath);
// Get the Background1 theme color.
let c = workbook.getThemeColor(AsposeCells.ThemeColorType.Background1);
// Print the color.
console.log("theme color Background1: ", c);
// Get the Accent2 theme color.
c = workbook.getThemeColor(AsposeCells.ThemeColorType.Accent2);
// Print the color.
console.log("theme color Accent2: ", c);
// Change the Background1 theme color.
workbook.setThemeColor(AsposeCells.ThemeColorType.Background1, AsposeCells.Color.Red);
// Get the updated Background1 theme color.
c = workbook.getThemeColor(AsposeCells.ThemeColorType.Background1);
// Print the updated color for confirmation.
console.log("theme color Background1 changed to: ", c);
// Change the Accent2 theme color.
workbook.setThemeColor(AsposeCells.ThemeColorType.Accent2, AsposeCells.Color.Blue);
// Get the updated Accent2 theme color.
c = workbook.getThemeColor(AsposeCells.ThemeColorType.Accent2);
// Print the updated color for confirmation.
console.log("theme color Accent2 changed to: ", c);
// Save the updated file.
workbook.save(path.join(dataDir, "output.out.xlsx"));

Gelişmiş Konular