Compare commits

...
3 Commits
Author SHA1 Message Date
saherelm f2c272e7a3 fix getXColorValue for reading color ... 2026-08-28 20:55:52 +03:30
saherelm 00031119ac apply color parser function ... 2026-08-28 03:36:11 +03:30
saherelm 1dc206c4b4 add new resources ... 2026-08-22 07:59:16 +03:30
2 changed files with 60 additions and 12 deletions
@@ -156,6 +156,20 @@ export enum XResourceIDs {
//
submit,
//
print,
export_png,
export_svg,
export_csv,
zoom_in,
zoom_out,
zoom_selection,
x_axis,
y_axis,
xy_axis,
pan,
full_screen,
//
//#region Pagination ...
first,
@@ -1179,3 +1179,37 @@ export function formatColor(
}
}
}
/**
* Retrieve Specified Color Identifier Value ...
*
* @param color Color Identifier ...
*
* @returns an string value which represent color ...
*/
export function getXColorValue(color: XColorIdentifier) {
//
let result = '';
//
if (!isNullOrUndefined(color)) {
//
const descriptor = parseXColor(color);
if (!isNullOrUndefined(descriptor)) {
//
var colorCssVarName = getXColorCssVariableName(
descriptor.name,
descriptor.isContrast,
descriptor.brightnessLevel,
);
if (!isNullOrEmptyString(colorCssVarName)) {
//
const computedStyle = getComputedStyle(document.documentElement);
result = computedStyle.getPropertyValue(colorCssVarName.trim()).trim();
}
}
}
//
return result;
}