メインコンテンツ

mlreportgen.ppt.FontColor クラス

名前空間: mlreportgen.ppt

説明

プレゼンテーションのフォント カラーを指定する書式。

mlreportgen.ppt.FontColor クラスは handle クラスです。

クラス属性

HandleCompatible
true
ConstructOnLoad
true

クラス属性の詳細については、クラスの属性を参照してください。

作成

説明

fontColorObj = mlreportgen.ppt.FontColor は、黒のフォント カラー オブジェクトを作成します。

fontColorObj = mlreportgen.ppt.FontColor(value) は、Value プロパティを value で指定された色に設定します。

プロパティ

すべて展開する

CSS の色名または 16 進数の RGB 値。文字ベクトルまたは string スカラーとして指定します。

  • 色の名前を使用するには、CSS の色名を指定します。CSS の色名のリストについては、https://www.w3.org/wiki/CSS/Properties/color/keywords を参照してください。

  • 16 進数の RGB 形式を指定するには、最初の文字として # を使用し、赤、緑、および青の値に 2 桁の 16 進数を使用します。たとえば、"#0000ff" は青を指定します。

属性:

GetAccess
public
SetAccess
public
NonCopyable
true

データ型: char | string

タグ。文字ベクトルまたは string スカラーとして指定します。PPT API は、このオブジェクトを作成するときに、セッション固有タグを生成します。生成されるタグの形式は CLASS:ID という形式です。ここで、CLASS はオブジェクト クラスです。ID はオブジェクトの Id プロパティの値です。この値を使用すると、ドキュメントの生成中に問題が発生した箇所を容易に特定できるようになります。

属性:

GetAccess
public
SetAccess
public
NonCopyable
true

データ型: char | string

オブジェクト識別子。文字ベクトルまたは string スカラーとして指定します。PPT API は、ドキュメント要素オブジェクトの作成時にセッション固有識別子を生成します。Id には独自の値を指定できます。

属性:

GetAccess
public
SetAccess
public
NonCopyable
true

データ型: char | string

すべて折りたたむ

プレゼンテーションを作成します。

import mlreportgen.ppt.*
ppt = Presentation("myFontColorPresentation.pptx");
open(ppt);
slide = add(ppt,"Title and Content");

段落を作成し、カラー テキストでテキストを追加します。

p = Paragraph("Hello World");

tRed = Text(" red text");
tRed.Style = {FontColor("red")};
append(p,tRed);

tBlue = Text(" blue text");
tBlue.Style = {FontColor("#0000ff")};
append(p,tBlue);

スライドに段落を追加します。

replace(slide,"Content",p);

プレゼンテーションを閉じて表示します。

close(ppt);
rptview(ppt);

Sample slide with a paragraph that reads "Hello World red text blue text", with "red text" displaying in red and "blue text" displaying in blue

バージョン履歴

R2015b で導入