signoz/frontend/src/utils/getAlphaColor.ts
dnazarenkoo 5f89e84eaf
feat: add logs context (#3190)
* feat: add the ability to share a link to a log line

* fix: update tooltip

* fix: resolve comments regarding query params

* fix: resolve comments

* feat: add logs context

* feat: add highlighting active items

* fix: resolve comments

* feat: fix showing log lines

* fix: update logs ordering

* fix: update page size and logs saving

* fix: update related to comments

* feat: logs context is updated

---------

Co-authored-by: Palash Gupta <palashgdev@gmail.com>
2023-07-30 16:32:18 +05:30

15 lines
373 B
TypeScript

import colorAlpha from 'color-alpha';
type GetAlphaColor = Record<0 | 10 | 25 | 45 | 75 | 100, string>;
const getAlphaColor = (color: string): GetAlphaColor => ({
0: colorAlpha(color, 0),
10: colorAlpha(color, 0.1),
25: colorAlpha(color, 0.25),
45: colorAlpha(color, 0.45),
75: colorAlpha(color, 0.75),
100: colorAlpha(color, 1),
});
export default getAlphaColor;