-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remap palette from eui to
@kbn/palette
pkg
- Loading branch information
1 parent
57ce853
commit e5b22b6
Showing
92 changed files
with
547 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
packages/kbn-coloring/src/shared_components/color_mapping/palettes/categorical/elastic.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
import { ColorMapping } from '../../config'; | ||
|
||
export const ELASTIC_PALETTE_COLORS = [ | ||
'#00BEB8', | ||
'#93E5E0', | ||
'#599DFF', | ||
'#B4D5FF', | ||
'#ED6BA2', | ||
'#FFBED5', | ||
'#F66D64', | ||
'#FFC0B8', | ||
'#ED9E00', | ||
'#FFD569', | ||
'#00CBC5', | ||
'#C0F1EE', | ||
'#78B0FF', | ||
'#D2E7FF', | ||
'#F588B3', | ||
'#FFD9E7', | ||
'#FC8A80', | ||
'#FFDAD5', | ||
'#F5AF00', | ||
'#FCE8B0', | ||
'#5DD8D2', | ||
'#D9FDFB', | ||
'#96C3FF', | ||
'#E5F1FF', | ||
'#FBA3C4', | ||
'#FFEBF5', | ||
'#FFA59C', | ||
'#FFE9E5', | ||
'#FEC514', | ||
'#FFF1CC', | ||
]; | ||
|
||
export const ElasticPalette: ColorMapping.CategoricalPalette = { | ||
id: 'elastic_borealis', | ||
name: i18n.translate('coloring.colorMapping.palettes.elastic.name', { | ||
defaultMessage: 'Elastic (default)', | ||
}), | ||
colorCount: ELASTIC_PALETTE_COLORS.length, | ||
type: 'categorical', | ||
getColor(indexInRange, isDarkMode, loop) { | ||
return ELASTIC_PALETTE_COLORS[ | ||
loop ? indexInRange % ELASTIC_PALETTE_COLORS.length : indexInRange | ||
]; | ||
}, | ||
}; |
11 changes: 11 additions & 0 deletions
11
packages/kbn-coloring/src/shared_components/color_mapping/palettes/categorical/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
export * from './neutral'; | ||
export * from './elastic'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
packages/kbn-coloring/src/shared_components/color_mapping/palettes/gradient/complementary.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
import { ColorMapping } from '../../config'; | ||
|
||
export const COMPLEMENTARY_PALETTE_COLORS = [ | ||
'#599DFF', | ||
'#96C3FF', | ||
'#D2E7FF', | ||
'#F5F9FE', | ||
'#F3E5C1', | ||
'#DDBF6A', | ||
'#C79700', | ||
]; | ||
|
||
export const ComplementaryPalette: ColorMapping.CategoricalPalette = { | ||
id: 'complementary', | ||
name: i18n.translate('coloring.colorMapping.palettes.complementary.name', { | ||
defaultMessage: 'Complementary', | ||
}), | ||
colorCount: COMPLEMENTARY_PALETTE_COLORS.length, | ||
type: 'gradient', | ||
getColor(indexInRange, isDarkMode, loop) { | ||
return COMPLEMENTARY_PALETTE_COLORS[ | ||
loop ? indexInRange % COMPLEMENTARY_PALETTE_COLORS.length : indexInRange | ||
]; | ||
}, | ||
}; |
32 changes: 32 additions & 0 deletions
32
packages/kbn-coloring/src/shared_components/color_mapping/palettes/gradient/cool.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
import { ColorMapping } from '../../config'; | ||
|
||
export const COOL_PALETTE_COLORS = [ | ||
'#F1F9FF', | ||
'#D2E7FF', | ||
'#B4D5FF', | ||
'#96C3FF', | ||
'#78B0FF', | ||
'#599DFF', | ||
]; | ||
|
||
export const CoolPalette: ColorMapping.CategoricalPalette = { | ||
id: 'cool', | ||
name: i18n.translate('coloring.colorMapping.palettes.cool.name', { | ||
defaultMessage: 'Cool', | ||
}), | ||
colorCount: COOL_PALETTE_COLORS.length, | ||
type: 'gradient', | ||
getColor(indexInRange, isDarkMode, loop) { | ||
return COOL_PALETTE_COLORS[loop ? indexInRange % COOL_PALETTE_COLORS.length : indexInRange]; | ||
}, | ||
}; |
Oops, something went wrong.