theme
New in version 0.9.1.
Contents
- class ooodev.theme.ThemeBasic(theme_name='')[source]
Theme Basic Properties.
The properties are populated from LibreOffice theme colors.
Automatic color values are returned with a value of
-1
. All other values are positive numbers.- Parameters:
theme_name (ThemeKind | str) –
- __init__(theme_name='')
Constructor
- Parameters:
theme_name (ThemeKind | str, optional) – Theme Name. If omitted then the current LibreOffice Theme is used.
- Return type:
None
- get_actual_theme_color_kind()
Get Theme Color Kind from configuration or current Document.
On some version of Linux the color is not correct when LibreOffice is set to use the system color scheme. This method will return the actual color scheme being used.
- Returns:
Theme Color Kind
- Return type:
- get_theme_color_kind()
Get Theme Color Kind from configuration.
- Returns:
Theme Color Kind
- Return type:
- is_document_dark()
Is Document set to a dark color scheme.
This method attempts to get the
LightColor
from the current document and determine if the document is dark.- Returns:
True
if document is dark,False
otherwise.- Return type:
bool
- property actual_theme_color_kind: ThemeColorKind
Get the actual theme color kind.
On MacOS and Windows this will be the same as the
theme_color_kind
. On Linux this may be different when LibreOffice is set to use system color scheme.This is because Linux does not always return the correct color scheme when LibreOffice is set to use the system color scheme. For this reason the color scheme is determined by the actual document color scheme.
- Return type:
- property comment_color: int
Comment color.
- Return type:
int
- property editor_color: int
Comment color.
- Return type:
int
- property error_color: int
Error color.
- Return type:
int
- property identifier_color: int
Identifier color.
- Return type:
int
- property keyword_color: int
Keyword color.
- Return type:
int
- property number_color: int
Number color.
- Return type:
int
- property operator_color: int
Operator color.
- Return type:
int
- property string_color: int
String color.
- Return type:
int
- property theme_color_kind: ThemeColorKind
This is the theme color kind that may not be the actual color kind being used.
Due to inconsistencies in the color scheme detection on Linux for System Theme this may not always be the actual color scheme reported in the configuration.
If the current LibreOffice Theme is not set to System then this will be the same as the actual color scheme.
- Return type:
- property theme_name: str
Get theme name
- Return type:
str
- class ooodev.theme.ThemeCalc(theme_name='')[source]
Theme Calc Properties.
The properties are populated from LibreOffice theme colors.
Automatic color values are returned with a value of
-1
. All other values are positive numbers.- Parameters:
theme_name (ThemeKind | str) –
- __init__(theme_name='')
Constructor
- Parameters:
theme_name (ThemeKind | str, optional) – Theme Name. If omitted then the current LibreOffice Theme is used.
- Return type:
None
- get_actual_theme_color_kind()
Get Theme Color Kind from configuration or current Document.
On some version of Linux the color is not correct when LibreOffice is set to use the system color scheme. This method will return the actual color scheme being used.
- Returns:
Theme Color Kind
- Return type:
- get_theme_color_kind()
Get Theme Color Kind from configuration.
- Returns:
Theme Color Kind
- Return type:
- is_document_dark()
Is Document set to a dark color scheme.
This method attempts to get the
LightColor
from the current document and determine if the document is dark.- Returns:
True
if document is dark,False
otherwise.- Return type:
bool
- property actual_theme_color_kind: ThemeColorKind
Get the actual theme color kind.
On MacOS and Windows this will be the same as the
theme_color_kind
. On Linux this may be different when LibreOffice is set to use system color scheme.This is because Linux does not always return the correct color scheme when LibreOffice is set to use the system color scheme. For this reason the color scheme is determined by the actual document color scheme.
- Return type:
- property comments_color: int
Comments color.
- Return type:
int
- property detective_color: int
Detective color.
- Return type:
int
- property detective_error_color: int
Detective Error color.
- Return type:
int
- property formula_color: int
Formula color.
- Return type:
int
- property grid_color: int
Grid color.
- Return type:
int
Hidden column/row color.
- Return type:
int
Hidden column/row visible.
- Return type:
bool
- property notes_background_color: int
Notes background color.
- Return type:
int
- property page_break_auto_color: int
Page Break Automatic color.
- Return type:
int
- property page_break_color: int
Page Break color.
- Return type:
int
- property page_break_manual_color: int
Page Break Manual color.
- Return type:
int
- property protected_background_color: int
Calc Protected Background color.
- Return type:
int
- property reference_color: int
Reference color.
- Return type:
int
- property text_color: int
Text color.
- Return type:
int
- property text_overflow_color: int
Text Overflow color.
- Return type:
int
- property text_overflow_visible: bool
Text Overflow visible.
- Return type:
bool
- property theme_color_kind: ThemeColorKind
This is the theme color kind that may not be the actual color kind being used.
Due to inconsistencies in the color scheme detection on Linux for System Theme this may not always be the actual color scheme reported in the configuration.
If the current LibreOffice Theme is not set to System then this will be the same as the actual color scheme.
- Return type:
- property theme_name: str
Get theme name
- Return type:
str
- property value_color: int
Value color.
- Return type:
int
- class ooodev.theme.ThemeColorKind(value)[source]
An enumeration.
- DARK = 2
- LIGHT = 1
- SYSTEM = 0
- UNKNOWN = -1
- class ooodev.theme.ThemeDraw(theme_name='')[source]
Theme Draw Properties.
The properties are populated from LibreOffice theme colors.
Automatic color values are returned with a value of
-1
. All other values are positive numbers.- Parameters:
theme_name (ThemeKind | str) –
- __init__(theme_name='')
Constructor
- Parameters:
theme_name (ThemeKind | str, optional) – Theme Name. If omitted then the current LibreOffice Theme is used.
- Return type:
None
- get_actual_theme_color_kind()
Get Theme Color Kind from configuration or current Document.
On some version of Linux the color is not correct when LibreOffice is set to use the system color scheme. This method will return the actual color scheme being used.
- Returns:
Theme Color Kind
- Return type:
- get_theme_color_kind()
Get Theme Color Kind from configuration.
- Returns:
Theme Color Kind
- Return type:
- is_document_dark()
Is Document set to a dark color scheme.
This method attempts to get the
LightColor
from the current document and determine if the document is dark.- Returns:
True
if document is dark,False
otherwise.- Return type:
bool
- property actual_theme_color_kind: ThemeColorKind
Get the actual theme color kind.
On MacOS and Windows this will be the same as the
theme_color_kind
. On Linux this may be different when LibreOffice is set to use system color scheme.This is because Linux does not always return the correct color scheme when LibreOffice is set to use the system color scheme. For this reason the color scheme is determined by the actual document color scheme.
- Return type:
- property grid_color: int
Grid color.
- Return type:
int
- property grid_visible: bool
Grid visible.
- Return type:
bool
- property theme_color_kind: ThemeColorKind
This is the theme color kind that may not be the actual color kind being used.
Due to inconsistencies in the color scheme detection on Linux for System Theme this may not always be the actual color scheme reported in the configuration.
If the current LibreOffice Theme is not set to System then this will be the same as the actual color scheme.
- Return type:
- property theme_name: str
Get theme name
- Return type:
str
- class ooodev.theme.ThemeGeneral(theme_name='')[source]
Theme General Properties.
The properties are populated from LibreOffice theme colors.
Automatic color values are returned with a value of
-1
. All other values are positive numbers.- Parameters:
theme_name (ThemeKind | str) –
- __init__(theme_name='')
Constructor
- Parameters:
theme_name (ThemeKind | str, optional) – Theme Name. If omitted then the current LibreOffice Theme is used.
- Return type:
None
- get_actual_theme_color_kind()
Get Theme Color Kind from configuration or current Document.
On some version of Linux the color is not correct when LibreOffice is set to use the system color scheme. This method will return the actual color scheme being used.
- Returns:
Theme Color Kind
- Return type:
- get_theme_color_kind()
Get Theme Color Kind from configuration.
- Returns:
Theme Color Kind
- Return type:
- is_document_dark()
Is Document set to a dark color scheme.
This method attempts to get the
LightColor
from the current document and determine if the document is dark.- Returns:
True
if document is dark,False
otherwise.- Return type:
bool
- property actual_theme_color_kind: ThemeColorKind
Get the actual theme color kind.
On MacOS and Windows this will be the same as the
theme_color_kind
. On Linux this may be different when LibreOffice is set to use system color scheme.This is because Linux does not always return the correct color scheme when LibreOffice is set to use the system color scheme. For this reason the color scheme is determined by the actual document color scheme.
- Return type:
- property background_color: int
Application Background color.
- Return type:
int
- property doc_background_color: int
Document Background color.
- Return type:
int
- property doc_boundaries_color: int
Doc (text) Boundaries color.
- Return type:
int
- property doc_boundaries_visible: bool
Doc (text) Boundaries visible.
- Return type:
bool
- property font_color: int
Font color.
- Return type:
int
- property links_color: int
Links color.
- Return type:
int
- property links_visible: bool
Links visible.
- Return type:
bool
- property links_visited_color: int
Links visited color.
- Return type:
int
- property links_visited_visible: bool
Links visited visible.
- Return type:
bool
- property object_boundaries_color: int
Object boundaries color.
- Return type:
int
- property object_boundaries_visible: bool
Object boundaries visible.
- Return type:
bool
- property shadow_color: int
Shadow color.
- Return type:
int
- property shadow_visible: bool
Shadow visible.
- Return type:
bool
- property smart_tags_color: int
Smart Tags color.
- Return type:
int
- property spell_color: int
Spelling mistakes color.
- Return type:
int
- property table_boundaries_color: int
Table Boundaries color.
- Return type:
int
- property table_boundaries_visible: bool
Table Boundaries visible.
- Return type:
bool
- property theme_color_kind: ThemeColorKind
This is the theme color kind that may not be the actual color kind being used.
Due to inconsistencies in the color scheme detection on Linux for System Theme this may not always be the actual color scheme reported in the configuration.
If the current LibreOffice Theme is not set to System then this will be the same as the actual color scheme.
- Return type:
- property theme_name: str
Get theme name
- Return type:
str
- class ooodev.theme.ThemeHtml(theme_name='')[source]
Theme HTML properties.
The properties are populated from LibreOffice theme colors.
Automatic color values are returned with a value of
-1
. All other values are positive numbers.- Parameters:
theme_name (ThemeKind | str) –
- __init__(theme_name='')
Constructor
- Parameters:
theme_name (ThemeKind | str, optional) – Theme Name. If omitted then the current LibreOffice Theme is used.
- Return type:
None
- get_actual_theme_color_kind()
Get Theme Color Kind from configuration or current Document.
On some version of Linux the color is not correct when LibreOffice is set to use the system color scheme. This method will return the actual color scheme being used.
- Returns:
Theme Color Kind
- Return type:
- get_theme_color_kind()
Get Theme Color Kind from configuration.
- Returns:
Theme Color Kind
- Return type:
- is_document_dark()
Is Document set to a dark color scheme.
This method attempts to get the
LightColor
from the current document and determine if the document is dark.- Returns:
True
if document is dark,False
otherwise.- Return type:
bool
- property actual_theme_color_kind: ThemeColorKind
Get the actual theme color kind.
On MacOS and Windows this will be the same as the
theme_color_kind
. On Linux this may be different when LibreOffice is set to use system color scheme.This is because Linux does not always return the correct color scheme when LibreOffice is set to use the system color scheme. For this reason the color scheme is determined by the actual document color scheme.
- Return type:
- property comment_color: int
Comment color.
- Return type:
int
- property keyword_color: int
Keyword color.
- Return type:
int
- property sgml_color: int
SGML syntax highlighting color.
- Return type:
int
- property theme_color_kind: ThemeColorKind
This is the theme color kind that may not be the actual color kind being used.
Due to inconsistencies in the color scheme detection on Linux for System Theme this may not always be the actual color scheme reported in the configuration.
If the current LibreOffice Theme is not set to System then this will be the same as the actual color scheme.
- Return type:
- property theme_name: str
Get theme name
- Return type:
str
- property unknown_color: int
Unknown color.
- Return type:
int
- class ooodev.theme.ThemeKind(value)[source]
Theme Kind Lookup
- AUTOMATIC = 'COLOR_SCHEME_LIBREOFFICE_AUTOMATIC'
- LIBRE_OFFICE = 'LibreOffice'
- LIBRE_OFFICE_DARK = 'LibreOffice Dark'
- class ooodev.theme.ThemeRptBuilder(theme_name='')[source]
Theme Report Builder properties
The properties are populated from LibreOffice theme colors.
Automatic color values are returned with a value of
-1
. All other values are positive numbers.- Parameters:
theme_name (ThemeKind | str) –
- __init__(theme_name='')
Constructor
- Parameters:
theme_name (ThemeKind | str, optional) – Theme Name. If omitted then the current LibreOffice Theme is used.
- Return type:
None
- get_actual_theme_color_kind()
Get Theme Color Kind from configuration or current Document.
On some version of Linux the color is not correct when LibreOffice is set to use the system color scheme. This method will return the actual color scheme being used.
- Returns:
Theme Color Kind
- Return type:
- get_theme_color_kind()
Get Theme Color Kind from configuration.
- Returns:
Theme Color Kind
- Return type:
- is_document_dark()
Is Document set to a dark color scheme.
This method attempts to get the
LightColor
from the current document and determine if the document is dark.- Returns:
True
if document is dark,False
otherwise.- Return type:
bool
- property actual_theme_color_kind: ThemeColorKind
Get the actual theme color kind.
On MacOS and Windows this will be the same as the
theme_color_kind
. On Linux this may be different when LibreOffice is set to use system color scheme.This is because Linux does not always return the correct color scheme when LibreOffice is set to use the system color scheme. For this reason the color scheme is determined by the actual document color scheme.
- Return type:
Column Footer color.
- Return type:
int
- property column_header_color: int
Column Header color.
- Return type:
int
- property detail_color: int
Detail color.
- Return type:
int
Group Footer color.
- Return type:
int
- property group_header_color: int
Group Header color.
- Return type:
int
- property overlap_control_color: int
Overlapped control color.
- Return type:
int
Page Footer color.
- Return type:
int
- property page_header_color: int
Page Header color.
- Return type:
int
Report Footer color.
- Return type:
int
- property report_header_color: int
Report Header color.
- Return type:
int
- property text_box_bound_content_color: int
Text Box Bound Content color.
- Return type:
int
- property theme_color_kind: ThemeColorKind
This is the theme color kind that may not be the actual color kind being used.
Due to inconsistencies in the color scheme detection on Linux for System Theme this may not always be the actual color scheme reported in the configuration.
If the current LibreOffice Theme is not set to System then this will be the same as the actual color scheme.
- Return type:
- property theme_name: str
Get theme name
- Return type:
str
- class ooodev.theme.ThemeSql(theme_name='')[source]
Theme SQL Properties.
The properties are populated from LibreOffice theme colors.
Automatic color values are returned with a value of
-1
. All other values are positive numbers.- Parameters:
theme_name (ThemeKind | str) –
- __init__(theme_name='')
Constructor
- Parameters:
theme_name (ThemeKind | str, optional) – Theme Name. If omitted then the current LibreOffice Theme is used.
- Return type:
None
- get_actual_theme_color_kind()
Get Theme Color Kind from configuration or current Document.
On some version of Linux the color is not correct when LibreOffice is set to use the system color scheme. This method will return the actual color scheme being used.
- Returns:
Theme Color Kind
- Return type:
- get_theme_color_kind()
Get Theme Color Kind from configuration.
- Returns:
Theme Color Kind
- Return type:
- is_document_dark()
Is Document set to a dark color scheme.
This method attempts to get the
LightColor
from the current document and determine if the document is dark.- Returns:
True
if document is dark,False
otherwise.- Return type:
bool
- property actual_theme_color_kind: ThemeColorKind
Get the actual theme color kind.
On MacOS and Windows this will be the same as the
theme_color_kind
. On Linux this may be different when LibreOffice is set to use system color scheme.This is because Linux does not always return the correct color scheme when LibreOffice is set to use the system color scheme. For this reason the color scheme is determined by the actual document color scheme.
- Return type:
- property comment_color: int
Comment color.
- Return type:
int
- property identifier_color: int
Identifier color.
- Return type:
int
- property keyword_color: int
Keyword color.
- Return type:
int
- property number_color: int
Keyword color.
- Return type:
int
- property operator_color: int
Operator color.
- Return type:
int
- property parameter_color: int
Parameter color.
- Return type:
int
- property string_color: int
String color.
- Return type:
int
- property theme_color_kind: ThemeColorKind
This is the theme color kind that may not be the actual color kind being used.
Due to inconsistencies in the color scheme detection on Linux for System Theme this may not always be the actual color scheme reported in the configuration.
If the current LibreOffice Theme is not set to System then this will be the same as the actual color scheme.
- Return type:
- property theme_name: str
Get theme name
- Return type:
str
- class ooodev.theme.ThemeTextDoc(theme_name='')[source]
Theme Text Doc (Writer) Properties.
The properties are populated from LibreOffice theme colors.
Automatic color values are returned with a value of
-1
. All other values are positive numbers.- Parameters:
theme_name (ThemeKind | str) –
- __init__(theme_name='')
Constructor
- Parameters:
theme_name (ThemeKind | str, optional) – Theme Name. If omitted then the current LibreOffice Theme is used.
- Return type:
None
- get_actual_theme_color_kind()
Get Theme Color Kind from configuration or current Document.
On some version of Linux the color is not correct when LibreOffice is set to use the system color scheme. This method will return the actual color scheme being used.
- Returns:
Theme Color Kind
- Return type:
- get_theme_color_kind()
Get Theme Color Kind from configuration.
- Returns:
Theme Color Kind
- Return type:
- is_document_dark()
Is Document set to a dark color scheme.
This method attempts to get the
LightColor
from the current document and determine if the document is dark.- Returns:
True
if document is dark,False
otherwise.- Return type:
bool
- property actual_theme_color_kind: ThemeColorKind
Get the actual theme color kind.
On MacOS and Windows this will be the same as the
theme_color_kind
. On Linux this may be different when LibreOffice is set to use system color scheme.This is because Linux does not always return the correct color scheme when LibreOffice is set to use the system color scheme. For this reason the color scheme is determined by the actual document color scheme.
- Return type:
- property direct_cursor_color: int
Direct Cursor color.
- Return type:
int
- property direct_cursor_visible: bool
Direct Cursor visible.
- Return type:
bool
- property field_shadings_color: int
Field Shadings color.
- Return type:
int
- property field_shadings_visible: bool
Field Shadings visible.
- Return type:
bool
- property grammar_color: int
Grammar mistakes color.
- Return type:
int
- property grid_color: int
Grid color.
- Return type:
int
Header and footer delimiter color.
- Return type:
int
- property index_table_shadings_color: int
Index and Table Shadings color.
- Return type:
int
- property index_table_shadings_visible: bool
Index and Table Shadings visible.
- Return type:
bool
- property page_columns_breaks_color: int
Page and Columns breaks color.
- Return type:
int
- property script_indicator_color: int
Script Indicator color.
- Return type:
int
- property section_boundaries_color: int
Section Boundaries color.
- Return type:
int
- property section_boundaries_visible: bool
Direct Cursor visible.
- Return type:
bool
- property theme_color_kind: ThemeColorKind
This is the theme color kind that may not be the actual color kind being used.
Due to inconsistencies in the color scheme detection on Linux for System Theme this may not always be the actual color scheme reported in the configuration.
If the current LibreOffice Theme is not set to System then this will be the same as the actual color scheme.
- Return type:
- property theme_name: str
Get theme name
- Return type:
str